[Haskell-beginners] lambda

Stephen Tetley stephen.tetley at gmail.com
Tue Dec 28 19:22:59 CET 2010


Hi John

I'm not sure it can work properly in its current form.

If this is the code that's been posted to the list before, it was
originally a calculator with a stepper reduced a calculation a term at
at time:

input> (+ 3 (- 5 1))

ans> (+ 3 4)

"Do another step (y/n) or rollback (r)? :"

input> y

ans> 7

However once "let" was added, I'm not convinced the evalStep is right
as I think it works too greedily and stops evaluating a term at a
time, and instead evaluates all sub-terms.

Best wishes

Stephen



More information about the Beginners mailing list