[Haskell-beginners] Constrained polymorphic functions as natural transformations

Kim-Ee Yeoh ky3 at atamo.com
Fri Dec 13 18:55:08 UTC 2013


On Fri, Dec 13, 2013 at 10:25 PM, Matt R <habari.zerglings at gmail.com> wrote:

> Interesting to discover that not all polymorphic functions are natural
> transformations. "fix" seems rather exotic -- are there any less unusual
> examples?


None of the church numerals of type (a -> a) -> (a -> a) are natural
transformations either:

zero _ = id
one f = f
two f = f . f
three f = f . f . f
etc.

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20131214/e0377471/attachment.html>


More information about the Beginners mailing list