Is it possible to write the Y Combinator in Haskell?
It seems like it would have an infinitely recursive type.
Y :: f -> b -> c where f :: (f -
Here's a non-recursive definition of the y-combinator in haskell:
newtype Mu a = Mu (Mu a -> a) y f = (\h -> h $ Mu h) (\x -> f . (\(Mu g) -> g) x $ x)
hat tip