Commits

Meikel Brandmeyer committed b14a9e8

Bug fix for derived Monads from State

* monad/state.clj (bind): use the actual monad-type and not a hardwired State

  • Participants
  • Parent commits fc5d1a1

Comments (0)

Files changed (1)

File src/de/kotka/monad/state.clj

 
 (defmethod bind `State
   [m f]
-  (make-monad `State
+  (make-monad (monad-type m)
               (fn [s0]
                 (let [[a s1] (run m s0)]
                   (run (f a) s1)))))