Ignore:
Timestamp:
07/22/10 00:03:13 (11 years ago)
Author:
Kon Lovett
Message:

More sections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/combinators/trunk/logical-combinators.scm

    r18914 r18918  
    22;;;; Kon Lovett, Mar '09
    33
    4 (declare
    5   (usual-integrations)
    6   (generic)
    7   (inline)
    8   (local)
    9   (no-procedure-checks)
    10   (bound-to-procedure
    11     ##sys#check-closure) )
     4(module logical-combinators
    125
    13 (module logical-combinators (;export
    14   andf orf)
     6  (;export
     7    andf
     8    orf)
    159
    16 (import scheme chicken data-structures srfi-1)
     10  (import scheme chicken data-structures srfi-1)
     11
     12  (declare
     13    (type
     14      (andf (procedure (#!rest) *))
     15      (orf (procedure (#!rest) *)) ) )
    1716
    1817;; Eager 'or' & 'and'
     
    2726(define (orf . args)
    2827  (let loop ((args args))
    29     (cond ((null? args) #f)
    30           ((car args)   => identity)
    31           (else
    32             (loop (cdr args)) ) ) ) )
     28    (and (not (null? args))
     29         (or (car args)
     30             (loop (cdr args)) ) ) ) )
    3331
    3432) ;module logical-combinators
Note: See TracChangeset for help on using the changeset viewer.