diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-01-30 16:54:07 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-01-30 16:54:07 -0800 |
commit | 78f186f057733ac5c7ac2b524a31960f77935958 (patch) | |
tree | 5a1515746d3100728a90e961651ad662f0164b9a /lib.h | |
parent | 266f327291c92c3e26bfb2b9dccaa9136e7604b4 (diff) | |
download | txr-78f186f057733ac5c7ac2b524a31960f77935958.tar.gz txr-78f186f057733ac5c7ac2b524a31960f77935958.tar.bz2 txr-78f186f057733ac5c7ac2b524a31960f77935958.zip |
* eval.c (expand_op): When the variant is do, and the symbol
is an operator, then suppress the addition of the rest
parameter in the dotted cons position at the end of the form,
since this mechanism for applying additional arguments is only
supported by function calls, not by special forms.
* lib.h (and2, and3): New macros.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -726,6 +726,10 @@ INLINE val eq(val a, val b) { return ((a) == (b) ? t : nil); } #define or4(a, b, c, d) or2(a, or3(b, c, d)) +#define and2(a, b) ((a) ? (b) : nil) + +#define and3(a, b, c) ((a) && (b) ? (c) : nil) + #define c_true(c_cond) ((c_cond) ? t : nil) #define list_collect_decl(OUT, PTAIL) \ |