News for hackers. Stuff that matters.
Re:Making Map Operations Implicit in Programming by hopp_check on Tuesday December 17, 2013 @11:10AM (#6921846)
How difficult will code be to read if implicit operations are happening without any mention of the language construct executing them? As far as this goes, Haskell's Maybe monad is the simplest system I've ever seen:

  let x = Just 3 in
  do
   value <- x
   guard (value > 1)
   return (value * 4)
If x was 'Nothing' then the whole operation would short circuit and 'Nothing' would be returned. If the guard fails, then 'Nothing' is returned.

There are no comments on this comment yet.