Thu Apr 10 23:06:10 EDT 2008
hiding more stuff in 'data'
1. there is no difference in trying to extend stack -> (stack,data) ->
more, so it should work with just a number.
2. in a loop which has extra internal state, compute a composition of
functions where one of the functions is special, in that it can
refer to the enclosing state.
can't this be hidden in 'make-state?' : let that function perform all
the necessary combinations of state.
what i wonder is how to relate this to real monads: the operation of
"flattening" 2 monadic layers?
bind : (M t) -> (t -> M u) -> (M u)
map : (t -> u) -> (M t -> M u)
join : M (M t) -> M t
map seems really trivial, but join?