Skip to content

Instantly share code, notes, and snippets.

@alecramsay
Last active September 8, 2016 15:42
Show Gist options
  • Save alecramsay/bf32aa054f939bf2abf10db108c7725b to your computer and use it in GitHub Desktop.
Save alecramsay/bf32aa054f939bf2abf10db108c7725b to your computer and use it in GitHub Desktop.
4clojure: Infix Calculator - Problem #135
(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