Arithmetic evaluation: Difference between revisions

(→‎{{header|Common Lisp}}: Rewrite using more natural token representation, use of backquote, translation from infix to prefix and direct eval. More syntax error checking cases added.)
Line 1,841:
| Quot of expression * expression (* e1 / e2 *)
 
let rec eval expr = function
match expr with
| Const c -> c
| Sum (f, g) -> eval f +. eval g
Anonymous user