[Haskell-cafe] Pointed, but not Applicative

Ryan Ingram 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'

for example,
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
representation.

  -- ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110830/8109b710/attachment.htm>


More information about the Haskell-Cafe mailing list