hvm-core 0.2.26

HVM-Core is a massively parallel Interaction Combinator evaluator.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
T = λt λf t
F = λt λf f
And = λpλq (p q F)

Z = λs λz (z)
S = λn λs λz (s n)

Add = λa λb (a (S b))
Mul = λa λb λf (a (b f))
Pow = λa λb (a (Mul b) (S Z))

Node = λa λb λn λl (n a b)
Leaf = λn λl l

Alloc = λn (n (λp (Node (Alloc p) (Alloc p))) Leaf)
Destroy = λt (t (λaλb (And (Destroy a) (Destroy b))) T)

main = (Destroy (Alloc (Pow (S (S Z)) (S (S (S (S Z)))))))