From b3558360be4739765c629e98c735dc38c63a9c7a Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 16 Aug 2000 17:21:26 +0000 Subject: [PATCH] * tram.el (tram-compose-&&): Expand macro `closure-call'. (tram-compose-||): Ditto. --- tram.el | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) 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) -- 1.7.10.4