Advertisement
Vermiculus

Untitled

Apr 22nd, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.26 KB | None | 0 0
  1. ; (calc "1*2   +       3*   4")
  2. ; (calc "1*2+3*4")
  3. ; Pad each operator with spaces
  4. ; (calc "1 * 2 + 3 * 4")
  5. ; (+ (calc "1 * 2") (calc "3 * 4"))
  6. ; (+ (* (calc "1") (calc "2")) (* (calc "3") (calc "4")))
  7. ; (+ (* 1 2) (* 3 4))
  8. ; (eval (+ (* 1 2) (* 3 4)))
  9. ; 14
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement