Last active
September 8, 2016 15:42
-
-
Save alecramsay/bf32aa054f939bf2abf10db108c7725b to your computer and use it in GitHub Desktop.
4clojure: Infix Calculator - Problem #135
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn [& exp] | |
(reduce (fn [result instr] | |
(apply (first instr) (list result (second instr)))) | |
(first exp) | |
(partition 2 (rest exp)) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment