mirror of
https://github.com/sdiehl/write-you-a-haskell.git
synced 2024-09-11 19:47:31 +03:00
12 lines
240 B
Haskell
12 lines
240 B
Haskell
type Name = String
|
|
|
|
data Expr
|
|
= Var Name
|
|
| App Expr Expr
|
|
| Lam Name Expr
|
|
|
|
s, k, i :: Expr
|
|
s = Lam "x" (Var "x")
|
|
k = Lam "x" (Lam "y" (Var "x"))
|
|
i = Lam "x" (Lam "y" (Lam "z" (App (App (Var "x") (Var "z")) (App (Var "y") (Var "z")))))
|