Anonymous user
Parsing/RPN calculator algorithm: Difference between revisions
m
→Lambdatalk
m (adding steps in displaying the result) |
m (→Lambdatalk) |
||
Line 2,786:
{calc 3 4 2 * 1 5 - 2 3 pow pow / +}
->
3:
4: 3
2: 4 3
1: 8 3
5: 1 8 3
-
2: -4 8 3
3: 2 -4 8 3
-> 3.0001220703125
where
Line 2,806 ⟶ 2,807:
{lambda {:x :s}
{if {empty? :x}
then -> {car :s}
else {car :x}: {disp :s}{br}
{calc.r {cdr :x}
{if {unop? {car :x}}
|