Combinators.hs

Haskell

Public Domain

Various well-known lambda calculus combinators

Download (right click, save as, rename as appropriate)

Embed

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
module Combinators where
 k = const
 s x y z = x z (y z)
 i = id
 iota x = x s k  -- This was supposed to be an actual iota, but foo(book): seems to have problems with that.
 x' x = x k s k
 b = (.)
 c = flip
 w x y = x y y
 y f = f (y f)