[Haskell-cafe] Proposal: Applicative => Monad: Call for consensus
Ketil Malde
ketil at malde.org
Tue Jan 25 10:20:46 CET 2011
Erik Hesselink <hesselink at gmail.com> writes:
>>> importing Control.Applicative
>> main = print =<< liftM2 (+) readLn (return 3)
>> [...] line noise
> Why not just:
>
> main = print . (+3) =<< readLn
Or using applicative:
print =<< (+3) <$> readLn
?
(Which separates the printing from the addition.)
-k
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe
mailing list