Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Reverse.jar. Parent comment
I'm not sure this is widely agreed-upon. Here's what a program composed of pure functions looks like:
quux = baz . bar . foo
Now let's try it with monads:
quux = baz =<< bar =<< foo
>>= notation is quite elegant. do notation just makes functional programing look imperative.
There are no comments on this comment yet.
I'm not sure this is widely agreed-upon. Here's what a program composed of pure functions looks like:
This is a function of one argument that filters the input through foo, then bar, then baz. Just like UNIX pipes, but backwards.Now let's try it with monads:
Same thing; this is a function of one argument, one that passes that argument through foo, then bar, then baz.>>= notation is quite elegant. do notation just makes functional programing look imperative.