Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Y

Name: Anonymous 2008-09-01 9:16

Is there an explanation of Y that doesn't involve greek letters or
a digression into Haskell?

Name: Anonymous 2008-09-01 12:14

>>4
newtype Y a = Y { unY :: Y a -> a }

fix = \f -> (\x -> f ((unY x) x)) (Y (\x -> f ((unY x) x)))

fac = fix fac'
  where fac' f 0 = 1
        fac' f n = n * f (n - 1)

*Main> fac 10
3628800

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List