[Haskell-cafe] Pointed, but not Applicative
ryani.spam at gmail.com
Tue Aug 30 23:13:52 CEST 2011
On Tue, Aug 30, 2011 at 9:42 AM, Conal Elliott <conal at conal.net> wrote:
> I suspect this definition is what Sebastian meant by "converting back and
forth to ordinary lists".
Yep, I know; and technically it violates 'fmap id' == 'id'
fmap id (FList $ \xs -> xs ++ xs) = FList $ \xs -> xs
If you add this FList law, though, you're OK:
runFList fl as = runFList fl  ++ as
But, yes, this definition of fmap converts back to an ordinary list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe