Skip to content

Instantly share code, notes, and snippets.

@niuk
Created July 7, 2012 02:58
Show Gist options
  • Save niuk/3064098 to your computer and use it in GitHub Desktop.
Save niuk/3064098 to your computer and use it in GitHub Desktop.
1: Env _ (fromList [])
(lambda {f x y: f (x y)}) (lambda {x: x}) (lambda {f x: x f}) (lambda {x y: y})
1: Env _ (fromList [])
(lambda {f x y: f (x y)}) (lambda {x: x}) (lambda {f x: x f})
1: Env _ (fromList [])
(lambda {f x y: f (x y)}) (lambda {x: x})
1: Env _ (fromList [])
lambda {f x y: f (x y)}
1: Env _ (fromList [("f",a)])
lambda {x y: f (x y)}
1: Env _ (fromList [("f",a),("x",b)])
lambda {y: f (x y)}
1: Env _ (fromList [("f",a),("x",b),("y",c)])
f (x y)
1: Env _ (fromList [("f",a),("x",b),("y",c)])
f
2: fromList []
f :: a
3: fromList []
f :: a
f: fromList [("a",d -> e)]
1: Env _ (fromList [("f",d -> e),("x",b),("y",c)])
x y
1: Env _ (fromList [("f",d -> e),("x",b),("y",c)])
x
2: fromList []
x :: b
3: fromList []
x :: b
f: fromList [("b",f -> g)]
1: Env _ (fromList [("f",d -> e),("x",f -> g),("y",c)])
y
2: fromList []
y :: c
3: fromList []
y :: c
s: fromList [("f",c)]
fromList []
2: fromList [("b",c -> g),("f",c)]
(x :: b) (y :: c) :: g
3: fromList [("b",c -> g)]
(x :: c -> g) (y :: c) :: g
s: fromList [("d",g)]
fromList []
2: fromList [("a",g -> e),("b",c -> g),("d",g)]
(f :: a) ((x :: c -> g) (y :: c) :: g) :: e
3: fromList [("a",g -> e),("b",c -> g)]
(f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e
2: fromList [("a",g -> e),("b",c -> g)]
(lambda {(y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: c -> e
3: fromList [("a",g -> e),("b",c -> g)]
(lambda {(y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: c -> e
2: fromList [("a",g -> e),("b",c -> g)]
(lambda {(x :: b) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c: (c -> g) -> c -> e
3: fromList [("a",g -> e)]
(lambda {(x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c: (c -> g) -> c -> e
2: fromList [("a",g -> e)]
(lambda {(f :: a) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e
3: fromList []
(lambda {(f :: g -> e) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e
f: fromList []
1: Env _ (fromList [])
lambda {x: x}
1: Env _ (fromList [("x",h)])
x
2: fromList []
x :: h
3: fromList []
x :: h
2: fromList []
(lambda {(x :: h): x :: h}) :: forall h: h -> h
3: fromList []
(lambda {(x :: h): x :: h}) :: forall h: h -> h
s: fromList [("e",i),("g",i)]
fromList []
2: fromList [("e",i),("g",i)]
((lambda {(f :: g -> e) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e) ((lambda {(x :: h): x :: h}) :: forall h: h -> h) :: forall c i: (c -> i) -> c -> i
3: fromList []
((lambda {(f :: g -> e) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e) ((lambda {(x :: h): x :: h}) :: forall h: h -> h) :: forall c i: (c -> i) -> c -> i
f: fromList []
1: Env _ (fromList [])
lambda {f x: x f}
1: Env _ (fromList [("f",j)])
lambda {x: x f}
1: Env _ (fromList [("f",j),("x",k)])
x f
1: Env _ (fromList [("f",j),("x",k)])
x
2: fromList []
x :: k
3: fromList []
x :: k
f: fromList [("k",l -> m)]
1: Env _ (fromList [("f",j),("x",l -> m)])
f
2: fromList []
f :: j
3: fromList []
f :: j
s: fromList [("l",j)]
fromList []
2: fromList [("k",j -> m),("l",j)]
(x :: k) (f :: j) :: m
3: fromList [("k",j -> m)]
(x :: j -> m) (f :: j) :: m
2: fromList [("k",j -> m)]
(lambda {(x :: k): (x :: j -> m) (f :: j) :: m}) :: forall m: (j -> m) -> m
3: fromList []
(lambda {(x :: j -> m): (x :: j -> m) (f :: j) :: m}) :: forall m: (j -> m) -> m
2: fromList []
(lambda {(f :: j) (x :: j -> m): (x :: j -> m) (f :: j) :: m}) :: forall j m: j -> (j -> m) -> m
3: fromList []
(lambda {(f :: j) (x :: j -> m): (x :: j -> m) (f :: j) :: m}) :: forall j m: j -> (j -> m) -> m
s: fromList [("c",n),("i",(n -> o) -> o)]
fromList []
2: fromList [("c",n),("i",(n -> o) -> o)]
(((lambda {(f :: g -> e) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e) ((lambda {(x :: h): x :: h}) :: forall h: h -> h) :: forall c i: (c -> i) -> c -> i) ((lambda {(f :: j) (x :: j -> m): (x :: j -> m) (f :: j) :: m}) :: forall j m: j -> (j -> m) -> m) :: forall n o: n -> (n -> o) -> o
3: fromList []
(((lambda {(f :: g -> e) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e) ((lambda {(x :: h): x :: h}) :: forall h: h -> h) :: forall c i: (c -> i) -> c -> i) ((lambda {(f :: j) (x :: j -> m): (x :: j -> m) (f :: j) :: m}) :: forall j m: j -> (j -> m) -> m) :: forall n o: n -> (n -> o) -> o
f: fromList []
1: Env _ (fromList [])
lambda {x y: y}
1: Env _ (fromList [("x",p)])
lambda {y: y}
1: Env _ (fromList [("x",p),("y",q)])
y
2: fromList []
y :: q
3: fromList []
y :: q
2: fromList []
(lambda {(y :: q): y :: q}) :: forall q: q -> q
3: fromList []
(lambda {(y :: q): y :: q}) :: forall q: q -> q
2: fromList []
(lambda {(x :: p) (y :: q): y :: q}) :: forall p q: p -> q -> q
3: fromList []
(lambda {(x :: p) (y :: q): y :: q}) :: forall p q: p -> q -> q
s: fromList [("n",r -> s -> s)]
fromList []
2: fromList [("n",r -> s -> s)]
((((lambda {(f :: g -> e) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e) ((lambda {(x :: h): x :: h}) :: forall h: h -> h) :: forall c i: (c -> i) -> c -> i) ((lambda {(f :: j) (x :: j -> m): (x :: j -> m) (f :: j) :: m}) :: forall j m: j -> (j -> m) -> m) :: forall n o: n -> (n -> o) -> o) ((lambda {(x :: p) (y :: q): y :: q}) :: forall p q: p -> q -> q) :: forall o r s: ((r -> s -> s) -> o) -> o
3: fromList []
((((lambda {(f :: g -> e) (x :: c -> g) (y :: c): (f :: g -> e) ((x :: c -> g) (y :: c) :: g) :: e}) :: forall c e g: (g -> e) -> (c -> g) -> c -> e) ((lambda {(x :: h): x :: h}) :: forall h: h -> h) :: forall c i: (c -> i) -> c -> i) ((lambda {(f :: j) (x :: j -> m): (x :: j -> m) (f :: j) :: m}) :: forall j m: j -> (j -> m) -> m) :: forall n o: n -> (n -> o) -> o) ((lambda {(x :: p) (y :: q): y :: q}) :: forall p q: p -> q -> q) :: forall o r s: ((r -> s -> s) -> o) -> o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment