From 7367dc2d058f0e6895f1e8a1a8038eb1c384fd83 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Fri, 25 Apr 2014 01:27:13 -0400 Subject: [PATCH] Add fail macro --- include/monads.lfe | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/monads.lfe b/include/monads.lfe index a5f7d1d..ffc8913 100644 --- a/include/monads.lfe +++ b/include/monads.lfe @@ -12,6 +12,9 @@ (defmacro return (monad expr) `(: ,monad return ,expr)) +(defmacro fail (monad expr) + `(: ,monad fail ,expr)) + (defmacro sequence (monad list) `(: lists foldr (lambda (m acc) (mcons ,monad m acc))