#lang plait
eval(id) = error!
eval({let1 {x E1} E2}) = eval(E2[eval(E1)/x])
eval(LAM) = LAM ; assuming LAM is a function expr
eval({E1 E2}) = if eval(E1) == {lam x Ef} then
eval(Ef[eval(E2)/x])
else error!