Changeset 30673 in project


Ignore:
Timestamp:
04/09/14 22:33:31 (7 years ago)
Author:
Alaric Snell-Pym
Message:

Added (cond-list (<cond> <expr>)...) macro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/miscmacros/trunk/miscmacros.scm

    r26063 r30673  
    1010   ignore-values ignore-errors
    1111   ecase
    12    define-syntax-rule)
     12   define-syntax-rule
     13   cond-list)
    1314
    1415  (import scheme)
     
    287288    (else (error "no valid case" val))))
    288289
     290(define-syntax cond-list
     291  (syntax-rules ()
     292    ((cond-list) (list))
     293    ((cond-list (c e) rest ...)
     294     (let ((tail (cond-list rest ...)))
     295       (if c
     296           (cons e tail)
     297           tail)))))
     298
    289299)
Note: See TracChangeset for help on using the changeset viewer.