Arithmetic evaluation: Difference between revisions

m
→‎{{header|Tailspin}}: slightly more readable
(Added Tailspin solution)
m (→‎{{header|Tailspin}}: slightly more readable)
Line 5,981:
<lang tailspin>
templates variadicToBinary
when <[](1)> do $(1) !
otherwise [ { left: $(1), op: $(2), right: $(3)}, $(4..last)...] -> #
end variadicToBinary
Line 6,000:
<{op: <='*'>}> ($.left -> evaluateArithmetic) * ($.right -> evaluateArithmetic) !
<{op: <='/'>}> ($.left -> evaluateArithmetic) ~/ ($.right -> evaluateArithmetic) !
<>otherwise $ !
end evaluateArithmetic
 
Anonymous user