6
votes
Accepted
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 ...
3
votes
Accepted
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 ...
3
votes
Accepted
What is the equivalent of The Little Lisper project in Haskell?
There's a quite useful tutorial by Oleg Kiselyov and Chung-chieh Shan, in which they build a very simple implementation of the simply-typed lambda calculus with Hindley-Milner type inference. IIRC ...
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 ...
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 ...
1
vote
What is the equivalent of The Little Lisper project in Haskell?
There is a article "Typing Haskell With Haskell*". It presents the most problematic part of the question - making the type checker/inferrer for the Haskell language (all code included). As far as I ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lambda-calculus × 11lambda × 3
java × 2
algorithms × 2
haskell × 2
computer-science × 2
type-systems × 2
scheme × 2
python × 1
programming-languages × 1
functional-programming × 1
language-design × 1
recursion × 1
lisp × 1
bootstrap × 1
evaluation × 1
tail-call × 1
racket × 1