diff --git a/tk/listlogic.scm b/tk/listlogic.scm index 73e83df..801db55 100644 --- a/tk/listlogic.scm +++ b/tk/listlogic.scm @@ -47,9 +47,13 @@ (else (lp& eqv? ls1 ls2)))) ;; Returns the argument if it isn't #f, otherwise returns the empty list -(define (if-some $cond) - (if $cond $cond '())) +(define-syntax if-some + (syntax-rules () + ((if-some $cond) + (if $cond $cond '())))) ;; Returns the first argument if it isn't #f, otherwise returns the second. -(define (if-some-else $cond $else) - (if $cond $cond $else)) +(define-syntax if-some-else + (syntax-rules () + ((if-some-else $cond $else) + (if $cond $cond $else))))