Skip to content

Instantly share code, notes, and snippets.

Created Mar 30, 2011
What would you like to do?
; 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