Skip to main content
Share Your Experience: Take the 2024 Developer Survey
6 votes

Lambda calculus: Call by value / Call by name (lazy)

You want to apply (λz.zz) to the argument (λb.b) Call by value means: reduce the argument to normal form and then bind the parameter z to it Call by name means: replace each occurrence of the ...
Giorgio's user avatar
  • 19.7k
3 votes

Which Algorithm Approach Should I Take to Generate Lambda Expressions in Java?

The simplest approach would be to use a parser generate (perhaps antlr) to make a parser that produces a parse tree. You can then perform your reductions and conversions on the parse tree, rather ...
Periata Breatta's user avatar
1 vote

Generating a Beta Reduced Lambda Expression in Java

You should probably parse the expression into a tree where a node can be a function applications or a lambda abstraction and then implement beta-reduction on the tree. Also implement pretty-printing ...
DepressedDaniel's user avatar
1 vote

Lambda calculus: Call by value / Call by name (lazy)

Neither of these steps is correct, there is only one reducible expression in that term so in both cases the only valid step is to (\b. b)(\b. b). You are only allowed to perform a reduction when ...
daniel gratzer's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible