TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

6 pointsby ivan_krechetovabout 14 years ago

1 comment

old_soundabout 14 years ago
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."