[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: gosper at PARC-MAXC
- From: William A. Kornfeld <BAK at MIT-AI>
- Date: Wed ,24 Jun 81 04:03:00 EDT
- Cc: LISP-FORUM at MIT-AI
I have a macro I use occasionally called SEQ (previously reported to
this column) that addresses your problem. It was invented mostly
because it is sometimes easier to read function nesting "backwards".
For example: (SEQ (H x) (G * y) (F *)) expands into (F (G (H x) y)) If
more than one `*' appears, its smart about inserting a gensym'd symbol
so the thing doesnt get evaluated more than once, so
(SEQ (G x) (F * y *))
expands into:
(LET ((G0001 (G x))) (F G0001 y G0001))
I have found this inversion of functional notation to make things
much more readable in many situations and solves at least some cases
of your problem.
[I actually use the "circle-plus" character rather than * to avoid
clashes.]