[Haskell-beginners] can I use "pure" all the time instead of "return" now?

Anton Felix Lorenzen anfelor at posteo.de
Mon May 16 15:08:08 UTC 2016


Of course,

it doesn't solve anything, but..

{-# LANGUAGE PostfixOperators #-}

import Control.Applicative

(%%) :: Applicative f => a -> f a
(%%) = pure

go :: IO Int
go = (12 %%)

main = do
     num <- (12 %%)
     print num


More information about the Beginners mailing list