TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Swift: The Tao of Mappage

17 点作者 xngzng将近 10 年前

1 comment

MCRed将近 10 年前
Too bad this article didn&#x27;t get picked up on HN. It&#x27;s really good.<p>Map is a wonderful thing, and one of the neatest features of Elixir is the |&gt; operator which means &quot;take the output of the last function and put it in as the first parameter of the next&quot; So you can write things like:<p>Enum.map(first_list, first_function) |&gt; Enum.map(second_function) # This map runs over the output of the first.<p>I hope there&#x27;s a way to do something like this in swift... cause it makes programming fun. It&#x27;s basically Enum.map(Enum.Map(first_list, first_function), second_Function).