impc:ti:cond   scheme


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

Implementation

(define impc:ti:cond
  (lambda (ast)
    (cl:remove '()
               (if (null? ast) '()
                   (list 'if (caar ast)
                         (if (null? (cdar ast))
                             (impc:compiler:print-badly-formed-expression-error 'cond ast)
                             (apply list 'begin (cdar ast)))
                         (if (and
                              (not (null? (cdr ast)))
                              (eq? (caadr ast) 'else))
                             (apply list 'begin (cdadr ast))
                             (if (not (null? (cdr ast)))
                                 (impc:ti:cond (cdr ast)))))))))


Back to Index

Similar Entries