Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Extend-your-language/TXR/extend-your-language.txr
Normal file
9
Task/Extend-your-language/TXR/extend-your-language.txr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
(defmacro if2 (cond1 cond2 both first second . neither)
|
||||
(let ((res1 (gensym))
|
||||
(res2 (gensym)))
|
||||
^(let ((,res1 ,cond1)
|
||||
(,res2 ,cond2))
|
||||
(cond ((and ,res1 ,res2) ,both)
|
||||
(,res1 ,first)
|
||||
(,res2 ,second)
|
||||
(t ,*neither)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue