
16 Jun
2016
16 Jun
'16
12:30 p.m.
They're the same:
:t \x -> pure x \x -> pure x :: Applicative f => a -> f a :t \x -> pure $ x \x -> pure $ x :: Applicative f => a -> f a
Tom
El 16 jun 2016, a las 12:24, KC
escribió: Think of the types of
pure x
And
pure $ x
-- --
Sent from an expensive device which will be obsolete in a few months! :D
Casey
On Jun 16, 2016 9:06 AM,
wrote: foo :: Applicative f => f String foo = do x <- pure "this works" pure x ... but replace "pure x" with "pure $ x" and it doesn't typecheck: a monad instance is required!
Tom _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe