Created
March 30, 2011 23:33
-
-
Save marick/895525 to your computer and use it in GitHub Desktop.
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
; 1 - monadic value is named 'step-value'. A better name would be 'step-fn' | |
(defn logging-decider [step-value rest-fn] | |
(fn [log] | |
; 2 - here's why it's a better name: we call it to get a base value. | |
(let [{step-value :value, updated-log :log} (step-fn log)] | |
; (3) - here, we pass the base value to the rest of the computation. | |
( (rest-fn step-value) updated-log)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment