RosettaCodeData/Task/Extend-your-language/Scheme/extend-your-language.ss

8 lines
230 B
Scheme
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
(define-syntax if2
(syntax-rules ()
((if2 cond1 cond2 both-true first-true second-true none-true)
(let ((c2 cond2))
(if cond1
(if c2 both-true first-true)
(if c2 second-true none-true))))))