[Haskell] How to define Y combinator in Haskell
lennart at augustsson.net
Fri Sep 15 08:17:52 EDT 2006
Well, you can do it with the existing recursion in Haskell
let yc f = f (yc f)
Or you can encode it with type level recursion and no value recursion
by using a recursive data type.
On Sep 15, 2006, at 08:11 , Haihua Lin wrote:
> yc = \f -> (\x -> f(x x)) (\x -> f(x x))
> causes type error. Is there a way to define it in Haskell?
> Haskell mailing list
> Haskell at haskell.org
More information about the Haskell