[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
code walker -- ticl::let-if
- To: goldman@vaxa.isi.edu
- Subject: code walker -- ticl::let-if
- From: Gregor.pa@Xerox.COM
- Date: Fri, 13 Jan 89 11:03 PST
- Cc: commonloops.pa@Xerox.COM
- Fcc: BD:>Gregor>mail>outgoing-mail-5.text.newest
- In-reply-to: <8901131755.AA12097@vaxa.isi.edu>
- Line-fold: no
Does let-if in TICL only bind special variables?
If so, the following should work. I haven't tested it though. Let us
know so that we can add it to the sources.
#+TI
(define-walker-template TICL::LET-IF walk-let-if)
#+TI
(defun walk-let-if (form context env)
(let ((test (cadr form))
(bindings (caddr form))
(body (cdddr form)))
(walk-form-internal
`(let ()
(declare (special ,@(mapcar #'(lambda (x)
(if (listp x) (car x) x))
bindings)))
(flet ((.let-if-dummy. () ,@body))
(if ,test (let ,bindings (.let-if-dummy.))
(.let-if-dummy.))))
context
env)))
-------