haskell - How to reduce lambda calculus -
i try understand lambda calculus , read wonderful article.
on page 8, there expression:
(λy.(x(λx.xy)))
if going substitute left outer most(λy)
t
,
(λy.(x(λx.xy))) t
then result be?
x(λx.xy)
i took liberty of rewriting haskell syntax
(\y -> x (\x-> x y)) (\y -> x (\x-> x y)) t x (\x -> x t)
since y bound input \y y substituted t.
edit: noted in comment below if t contain free x important rename bound x in scope "fresh" name. name has no meaning. if say
let t = \t -> x t
then proper substitution like
x (\z -> z (\t -> x t))
where stated pigworker
z
chosen freshness fresh identifier replace our bound x prevent hiding free x in t.
Comments
Post a Comment