ljedrz / lambda_calculus

A simple, zero-dependency implementation of the untyped lambda calculus in Safe Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Succ and pred in Mogensen's binary encoding fail

ljedrz opened this issue · comments

Binary numerals are almost ready, but their succ and pred functions produce unexpected results in tests, even though they are defined as specified in the paper by T. Mogensen.

Issue was solved by replacing tuple!() with unapplied pair(). The macro is valid, but the succ and pred functions were expecting un-normalized tuples.