cond-eval   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/init.xtm

Implementation

(define (cond-eval condition)
  (cond ((symbol? condition)
         (if (member condition *features*) #t #f))
        ((eq? condition #t) #t)
        ((eq? condition #f) #f)
        (else (case (car condition)
                ((and) (cond-eval-and (cdr condition)))
                ((or) (cond-eval-or (cdr condition)))
                ((not) (if (not (null? (cddr condition)))
                           (error "cond-expand : 'not' takes 1 argument")
                           (not (cond-eval (cadr condition)))))
                (else (error "cond-expand : unknown operator" (car condition)))))))


Back to Index

Similar Entries