
31 Mar
2013
31 Mar
'13
5:27 a.m.
That's good enough. Thanks!
On Sun, Mar 31, 2013 at 11:08 AM, Franco
Ovidiu D
writes: I have the following code:
f1 :: String -> String
f2 :: IO String -> IO () f2 a = do b <- a putStr $ f1 b
How can I write the function f2 in a point-free style?
maybe
f2 = (=<<) (putStrLn . f1)
I still prefer the non point-free but clearer
f2 = a >>= (putStrLn . f1)
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners