[Haskell-cafe] Functor and Haskell

Kim-Ee Yeoh a.biurvOir4 at asuhan.com
Thu Apr 23 01:28:24 EDT 2009

Daryoush Mehrtash-2 wrote:
>> singleton :: a -> [a]
>> singleton x = [x]
>> Here F is the identity functor, and G is the list functor. And yes, C=D=
>> category of (a subset of) Haskell types.
> Are you saying the function that goes from list functor to singleton
> funtor
> is a natural transformation?

Here *singleton* is the natural transformation from the identity functor
to the list functor.

Daryoush Mehrtash-2 wrote:
> But aren't they functors to different subset of Haskell Types?

They're usually treated as endofunctors on Hask, for reasons
Ross Paterson has given.

View this message in context: http://www.nabble.com/Functor-and-Haskell-tp23166441p23189784.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list