diff options
Diffstat (limited to 'src/clojure/contrib/monads.clj')
-rw-r--r-- | src/clojure/contrib/monads.clj | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/clojure/contrib/monads.clj b/src/clojure/contrib/monads.clj index b2300863..476e649e 100644 --- a/src/clojure/contrib/monads.clj +++ b/src/clojure/contrib/monads.clj @@ -1,7 +1,7 @@ ;; Monads in Clojure ;; by Konrad Hinsen -;; last updated May 6, 2009 +;; last updated May 10, 2009 ;; Copyright (c) Konrad Hinsen, 2009. All rights reserved. The use ;; and distribution terms for this software are covered by the Eclipse @@ -169,6 +169,14 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Define the four basic monad operations as symbol macros that +; expand to their unqualified symbol equivalents. This makes it possible +; to use them inside macro templates without having to quote them. +(defsymbolmacro m-result m-result) +(defsymbolmacro m-bind m-bind) +(defsymbolmacro m-zero m-zero) +(defsymbolmacro m-plus m-plus) + (defmacro m-lift "Converts a function f of n arguments into a function of n monadic arguments returning a monadic value." |