--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
;Pair([{:balance 30, :applied-balance 30} {:balance 25, :applied-balance 25}],45)(use '[blancas.morph core monads])(def cards [{:balance 30} {:balance 25}])(def due 100)(run-state (mapm #(monad [due get-stateapp (state (min due (:balance %)))_ (put-state (- due app))](state (assoc % :applied-balance app))) cards) due)mapm is a map for monads; (state x) boxes cards; the state is the total due.
Hey Armando - How did you get the nice syntax highlighting into your
post??? Enquiring minds wanna know.....
Alan
Armando was a good citizen and sent along a plain-text version as well – https://groups.google.com/group/clojure/msg/6aae8287bc55d436?dmode=source&output=gplain&noredirect
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.