[Haskell] Y in haskell?

David Menendez zednenem at psualum.com
Mon Apr 18 01:08:45 EDT 2005


Trevion writes:

> On 4/18/05, Lloyd Allison <Lloyd.Allison at infotech.monash.edu.au>
wrote:
> > Is it possible to define Y in Haskell (pref' H98) --
> > and get it to pass type checking?
> 
> I believe that 
> 
> y f = f (y f)
> 
> is the normal way to do it.

I've also seen this:

    y f = g
        where g = f g
-- 
David Menendez <zednenem at psualum.com> | "In this house, we obey the laws
<http://www.eyrie.org/~zednenem>      |        of thermodynamics!"


More information about the Haskell mailing list