Skip to content

Instantly share code, notes, and snippets.

@NobukazuHanada
Created May 10, 2014 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NobukazuHanada/505d4009b00e15a1635a to your computer and use it in GitHub Desktop.
Save NobukazuHanada/505d4009b00e15a1635a to your computer and use it in GitHub Desktop.
(define (expr num1)
(lambda (op)
(cond [(member op '("+" "*" "-" "/"))
(lambda (num2) (expr ((eval (string->symbol op)) num1 num2)))]
[else num1])))
((((((((expr 4) "+") 3) "*") 2) "-") 1) "=")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment