From: ueno Date: Wed, 16 Aug 2000 17:21:26 +0000 (+0000) Subject: * tram.el (tram-compose-&&): Expand macro `closure-call'. X-Git-Tag: deisui-1_14_0-1~39 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3558360be4739765c629e98c735dc38c63a9c7a;p=elisp%2Fflim.git * tram.el (tram-compose-&&): Expand macro `closure-call'. (tram-compose-||): Ditto. --- diff --git a/tram.el b/tram.el index 3a2f61c..5bcfee5 100644 --- a/tram.el +++ b/tram.el @@ -56,8 +56,15 @@ (defun tram-compose-&& (left right) "Multiplicative combinator which composes LEFT and RIGHT operations." `(lambda (trans) - (let ((next (closure-call ',left trans))) - (closure-call ',right next)))) + (let ((next + ,(macroexpand + (if (functionp left) + `(closure-call #',left trans) + `(closure-call ',left trans))))) + ,(macroexpand + (if (functionp right) + `(closure-call #',right next) + `(closure-call ',right next)))))) (defun tram-compose-|| (left right) "Additive combinator which composes LEFT and RIGHT operations." @@ -65,10 +72,17 @@ (let (next error) (setq error (catch (tram-stream-error-name trans) - (setq next (closure-call ',left trans)) + (setq next + ,(macroexpand + (if (functionp left) + `(closure-call #',left trans) + `(closure-call ',left trans)))) nil)) (if error - (closure-call ',right trans) + ,(macroexpand + (if (functionp right) + `(closure-call #',right next) + `(closure-call ',right next))) next)))) (defun tram-fold-left (function accu sequence)