Fork me on GitHub
#funcool
<
2016-06-06
>
sparkofreason14:06:53

Best I've come up with so far:

sparkofreason15:06:46

Never mind. The above doesn't even work right. Below does exactly what the algo.monads example does, was getting hung up because I was specifying the initial value as a number and not an instance of state.

sparkofreason15:06:12

Very cool. If I had a nit to pick, it would be that if I want to specify the initial value for the reduce, I have to wrap it in m/return, specifying the context. m/return makes sense, but avoiding the context would be nice-to-have.

sparkofreason16:06:10

But I guess when the time comes to run the computation, you just wrap in with-context.