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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Street magic with functions - the video of the talk I gave at JSZurich meet-up

6 点作者 ivan_krechetov大约 14 年前

1 comment

old_sound大约 14 年前
This video has the best analogy I've heard so far regarding why you should use Monad to encapsulate side effects.<p>From the video: "The code that deals with side effects really stands out of the common body of code […] Is like having a bathroom in a house […], everybody who's in the house has to go to the toilet from time to time, but you know that when you need it there's bathroom, and you really shouldn't do the same business anywhere else in the house because it will just be a mess. That's why in Haskell, if you need to go to the bathroom you'll use monads."