Konrad,

Glad to know we were on the same page about monad transformers.

That transformer was indeed a translation from the Haskell
implementation.  Using 'with-monad' does clean it up.

I'll have to take a look at your implementation of m-bind.

I did prefer the conciseness and the fact that it would handle a
vector of more than one value.  But the behavior is identical, so it
seems it's more a matter of taste.

> > I also rewrote the maybe monad as:
> ...
>
> Why did you do this? Did you just want a more concise implementation,
> or is there a difference in behaviour? As far as I can see, your
> version of m-bind does exactly the same as mine for all input values
> that can occur in the given context. Yours would also do something
> useful given a vector of more than one value, but that should never
> happen in the maybe monad.

I've got some more thinking to do about transformers, when I get a
chance.

Jim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to