Functions are a type of monad, and function composition is a type of monadic binding. You could certainly say that middleware are a type of monad, but so many things can be thought of as monads that's not hugely useful in and of itself.
- James On 1 July 2016 at 18:14, Scott Klarenbach <doyouunderst...@gmail.com> wrote: > I'm looking for some insight into the relationship between Monads and > Middleware. > > It seems to me that middleware (ala Ring, Boot) is really just a subset of > Monads, where bind and lift are globally agreed upon conventions, rather > than explicitly defined. For example, with middleware you need every > function to accept and return the same signature so as to be composable, > whereas with monads you explicitly provide the code for binding and lifting > into and out of the monad world. > > My basic questions are: > > 1.) Is middleware really a monad with a different name? > 2.) Is there any compelling reason to use monads in clojure instead of > middleware? > 3.) Are there classes of problems that can be solved with monads that > can't be solved with middleware? > 4.) Is there any benefit (beyond curiosity) to porting/re-implementing > middleware as monads? > > Thanks. > > Scott Klarenbach > www.invisiblerobot.io > > > -- > 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 > Note that posts from new members are moderated - please be patient with > your first post. > 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 > --- > 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+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 Note that posts from new members are moderated - please be patient with your first post. 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 --- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.