News for hackers. Stuff that matters.
Re:“Mostly functional” programming does not work (2014) by tome on Monday June 22, 2015 @11:31AM (#9758991)
And yet the first example is in C# which is not a "lazy language". The problem is that in any language you do want lazy behaviour from time-to-time. For example in "get me the first element of this list that is positive" you do not want to traverse the rest of the list after you find your positive element. Laziness always has a weird interaction with effects and you always want (the potential for) some laziness, hence the problem.
Re:“Mostly functional” programming does not work (2014) by marcosdumay on Monday June 22, 2015 @03:20PM (#9760597)
1 - Why would you ever want to add a logger to a pure function?

2 - If you really, for some unknown reason, wants to do that, you can pass the logger as an argument to f2, and have it run inside the IO monad somewhere outside of that fragment. But really, read #1 first.

Re:“Mostly functional” programming does not work (2014) by tome on Monday June 22, 2015 @03:28PM (#9760642)
Did you reply to the wrong comment?
Re:“Mostly functional” programming does not work (2014) by marcosdumay on Monday June 22, 2015 @08:53PM (#9762101)
Ops. I did.