[Haskell-cafe] Re: The Worker/Wrapper Transformation
barsoap at web.de
Thu Jan 3 07:15:15 EST 2008
"Brent Yorgey" <byorgey at gmail.com> wrote:
> Well, (:) has type a -> [a] -> [a], so a function corresponding to
> (:) for Hughes lists should have type
> foo :: a -> H a -> H a
> I think the key sentence from the paper is this: "by
> representing a list xs as the function (xs ++) that appends this list
> to another list that has still to be supplied." If you understand
> that sentence, then you can understand why  is id and (++) is (.).
Yes, I did.
They key was not thinking that : has type
(:) :: a -> a -> [a]
, or, put differently, beat the lisp out of me, thanks.
The problem is merely that Haskell and lisp are too similar in a much
too different way.
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
More information about the Haskell-Cafe