[Haskell-beginners] Small question
edgar.klerks at gmail.com
Sun Feb 28 16:06:06 EST 2010
I have created a function mkc:
mkc :: (a -> b) -> a -> m b
mkc f = (\x -> return $ f x)
which works wonderful in statements like:
number <- many1 digit >>= mkc(read)
But somehow I think this function should already exist, it is some kind of
lifting. If it exist where can I find it? Or is there a reason, why it isn't
in prelude, because it is more elegant way to solve this problem.
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners