Changeset 37454 in project


Ignore:
Timestamp:
03/24/19 18:19:11 (5 months ago)
Author:
juergen
Message:

biglists 0.1.2 some typos corrected

Location:
release/5/biglists
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/5/biglists/tags/0.1.2/biglists.egg

    r37412 r37454  
    66 (dependencies bindings)
    77 (author "[[Juergen Lorenz]]")
    8  (version "0.1.1")
     8 (version "0.1.2")
    99 (components (extension biglists)))
    1010
  • release/5/biglists/tags/0.1.2/biglists.scm

    r37412 r37454  
    260260           (At (- n 1) (Rest xs)))
    261261         (error 'At "not a biglist" xs))))
    262     (else (error 'At "to many arguments"))))
     262    (else (error 'At "too many arguments"))))
    263263
    264264(define (List . args)
     
    296296;            (Cons (First xs) (Take (- k 1) (Rest xs)) #t)))
    297297;         (else (error 'Take "not a biglist" xs)))))
    298     (else (error 'Take "to many arguments"))))
     298    (else (error 'Take "too many arguments"))))
    299299
    300300(define (Take-while ok? . xss)
     
    319319              eos)))
    320320         (else (error 'Take-while "not a biglist" xs)))))
    321     (else (error 'Take-while "to many arguments"))))
     321    (else (error 'Take-while "too many arguments"))))
    322322
    323323(define (Take-until ok? . xss)
     
    345345                (Cons (First xs) (recur (Rest xs)) #t)))))
    346346         (else (error 'Take-until "not a biglist" xs)))))
    347     (else (error 'Take-while "to many arguments"))))
     347    (else (error 'Take-while "too many arguments"))))
    348348
    349349(define (Drop k . xss)
     
    359359           (Drop (- k 1) (Rest xs)))
    360360         (error 'Drop "not a biglist" xs))))
    361     (else (error 'Drop "to many arguments"))))
     361    (else (error 'Drop "too many arguments"))))
    362362
    363363(define (Drop-while ok? . xss)
     
    378378            (loop (Rest xs)))
    379379           (else xs)))))
    380     (else (error 'Drop-while "to many arguments"))))
     380    (else (error 'Drop-while "too many arguments"))))
    381381
    382382(define (Drop-until ok? . xss)
     
    396396           ((ok? (First xs)) xs)
    397397           (else (loop (Rest xs)))))))
    398     (else (error 'Drop-until "to many arguments"))))
     398    (else (error 'Drop-until "too many arguments"))))
    399399
    400400(define BigList->list
     
    423423            (else (error 'BigList->list "not a biglist" xs)))))
    424424       (else
    425          (error 'BigList->list "to many arguments"))))
     425         (error 'BigList->list "too many arguments"))))
    426426    ))
    427427
     
    468468           (error 'Filter "not a biglist" xs)))))
    469469    (else
    470       (error 'Filter "to many arguments"))
     470      (error 'Filter "too many arguments"))
    471471    ))
    472472
     
    579579         (else
    580580           (error 'Reverse "invalid arguments" xs ys)))))
    581     (else (error 'Reverse "to many arguments"))))
     581    (else (error 'Reverse "too many arguments"))))
    582582
    583583(define (Reverse* xs)
     
    688688             (else #f)))
    689689         (error 'Sorted? "not a finite biglist" xs))))
    690     (else (error 'Sorted? "to many arguments"))))
     690    (else (error 'Sorted? "too many arguments"))))
    691691
    692692(define (Merge <? xs ys)
     
    730730                      (Sort <? (Drop halflen xs))))))
    731731         (error 'Sort "not a finite biglist" xs))))
    732     (else (error 'Sort "to many arguments"))))
     732    (else (error 'Sort "too many arguments"))))
    733733
    734734(define (Every? ok? . xss)
     
    747747             (else #f)))
    748748         (error 'Every? "not a finite biglist" xs))))
    749     (else (error 'Every? "to many arguments"))))
     749    (else (error 'Every? "too many arguments"))))
    750750
    751751(define (Some? ok? . xss)
     
    764764               (loop (Rest xs)))))
    765765         (error 'Some? "not a finite biglist" xs))))
    766     (else (error 'Some? "to many arguments"))))
     766    (else (error 'Some? "too many arguments"))))
    767767
    768768(define (Index ok? . xss)
     
    780780             (else (loop (Rest xs) (+ k 1)))))
    781781         (error 'Index "not a biglist" xs))))
    782     (else (error 'Index "to many arguments"))))
     782    (else (error 'Index "too many arguments"))))
    783783
    784784(define (Memp ok? . xss)
     
    799799             ((ok? (First xs)) xs)
    800800             (else (loop (Rest xs))))))))
    801     (else (error 'Memp "to many arguments"))))
     801    (else (error 'Memp "too many arguments"))))
    802802
    803803(define (Memq var . xss)
     
    853853              (else (loop (Rest xs))))))
    854854         (else (error 'Assp "not a finite biglist" xs)))))
    855     (else (error 'Assp "to many arguments"))
     855    (else (error 'Assp "too many arguments"))
    856856    ))
    857857
     
    871871    ((null? (cdr xss))
    872872     (Filter (o not ok?) (car xss)))
    873     (else (error 'Remp "to many arguements"))))
     873    (else (error 'Remp "too many arguements"))))
    874874
    875875(define (Remove val . xss)
     
    946946;           (Fold-right op (First xs) (Rest xs)))
    947947;         (error 'Fold-ritht0 "not a finite biglist"))))
    948 ;    (else (error 'Fold-right0 "to many arguments"))))
     948;    (else (error 'Fold-right0 "too many arguments"))))
    949949
    950950(define (Fold-left0 op . xss)
     
    975975;           (Fold-left op (First xs) (Rest xs)))
    976976;         (error 'Fold-left0 "not a finite biglist"))))
    977 ;    (else (error 'Fold-left0 "to many arguments"))))
     977;    (else (error 'Fold-left0 "too many arguments"))))
    978978
    979979(define (Scan-right op init . xss)
     
    10781078     (let recur ((x (First xs)))
    10791079       (Cons x (recur (fn x)) #f)))
    1080     (else 'Iterate "to many arguments")))
     1080    (else 'Iterate "too many arguments")))
    10811081
    10821082(define (Cycle xs)
     
    11121112    ))
    11131113
    1114 ;;; (For ((var lst ok? ...) ....) item)
    1115 ;;; ------------------------------------
     1114;;; (For ((var xs ok-xpr ...) (var1 xs1 ok-xpr1 ...) ...) item-xpr)
     1115;;; ---------------------------------------------------------------
    11161116(define-syntax For
    11171117  (syntax-rules ()
    1118    ((_ ((var xs ok? ...)) item)
     1118   ((_ ((var xs ok-xpr ...)) item-xpr)
    11191119    (cond
    11201120      ((Eager? xs)
     
    11231123           '()
    11241124           (let ((var (First seq)))
    1125              (if (and ok? ...)
    1126                (Cons item (recur (Rest seq)))
     1125             (if (and ok-xpr ...)
     1126               (Cons item-xpr (recur (Rest seq)))
    11271127               (recur (Rest seq)))))))
    11281128      ((Lazy? xs)
     
    11311131           eos
    11321132           (let ((var (First seq)))
    1133              (if (and ok? ...)
    1134                (Cons item (recur (Rest seq)) #t)
     1133             (if (and ok-xpr ...)
     1134               (Cons item-xpr (recur (Rest seq)) #t)
    11351135               (recur (Rest seq)))))))
    11361136      (else (error 'For "not a biglist" xs))))
    1137     ((_ ((var xs ok? ...) (var1 xs1 ok1? ...) ...) item)
     1137    ((_ ((var xs ok-xpr ...) (var1 xs1 ok-xpr1 ...) ...) item-xpr)
    11381138     (let recur ((seq xs))
    11391139       (if (Null? seq)
     
    11431143           (else (error 'For "not a biglist" seq)))
    11441144         (let ((var (First seq)))
    1145            (if (and ok? ...)
    1146              (Append (For ((var1 xs1 ok1? ...) ...) item)
     1145           (if (and ok-xpr ...)
     1146             (Append (For ((var1 xs1 ok-xpr1 ...) ...) item-xpr)
    11471147                     (recur (Rest seq)))
    11481148             (recur (Rest seq)))))))
     
    13091309    (For
    13101310      macro:
    1311       (For ((var xs ok? ...) ....) item)
     1311      (For ((var xs ok-xpr ...) (var1 xs1 ok-xpr1 ...) ...) item-xpr)
    13121312      "creates a new list by binding var to each element"
    13131313      "of the list xs in sequence, and if it passes the checks,"
    1314       "ok? ..., inserts item into the result list."
    1315       "The qualifieres, (var xs ok? ...), are processed"
     1314      "ok-xpr ..., inserts the value of item-xpr into the result list."
     1315      "The qualifieres, (var xs ok-xpr ...), are processed"
    13161316      "sequentially from left to right, so that filters of a"
    13171317      "qualifier have access to the variables of qualifiers"
  • release/5/biglists/trunk/biglists.egg

    r37412 r37454  
    66 (dependencies bindings)
    77 (author "[[Juergen Lorenz]]")
    8  (version "0.1.1")
     8 (version "0.1.2")
    99 (components (extension biglists)))
    1010
  • release/5/biglists/trunk/biglists.scm

    r37412 r37454  
    260260           (At (- n 1) (Rest xs)))
    261261         (error 'At "not a biglist" xs))))
    262     (else (error 'At "to many arguments"))))
     262    (else (error 'At "too many arguments"))))
    263263
    264264(define (List . args)
     
    296296;            (Cons (First xs) (Take (- k 1) (Rest xs)) #t)))
    297297;         (else (error 'Take "not a biglist" xs)))))
    298     (else (error 'Take "to many arguments"))))
     298    (else (error 'Take "too many arguments"))))
    299299
    300300(define (Take-while ok? . xss)
     
    319319              eos)))
    320320         (else (error 'Take-while "not a biglist" xs)))))
    321     (else (error 'Take-while "to many arguments"))))
     321    (else (error 'Take-while "too many arguments"))))
    322322
    323323(define (Take-until ok? . xss)
     
    345345                (Cons (First xs) (recur (Rest xs)) #t)))))
    346346         (else (error 'Take-until "not a biglist" xs)))))
    347     (else (error 'Take-while "to many arguments"))))
     347    (else (error 'Take-while "too many arguments"))))
    348348
    349349(define (Drop k . xss)
     
    359359           (Drop (- k 1) (Rest xs)))
    360360         (error 'Drop "not a biglist" xs))))
    361     (else (error 'Drop "to many arguments"))))
     361    (else (error 'Drop "too many arguments"))))
    362362
    363363(define (Drop-while ok? . xss)
     
    378378            (loop (Rest xs)))
    379379           (else xs)))))
    380     (else (error 'Drop-while "to many arguments"))))
     380    (else (error 'Drop-while "too many arguments"))))
    381381
    382382(define (Drop-until ok? . xss)
     
    396396           ((ok? (First xs)) xs)
    397397           (else (loop (Rest xs)))))))
    398     (else (error 'Drop-until "to many arguments"))))
     398    (else (error 'Drop-until "too many arguments"))))
    399399
    400400(define BigList->list
     
    423423            (else (error 'BigList->list "not a biglist" xs)))))
    424424       (else
    425          (error 'BigList->list "to many arguments"))))
     425         (error 'BigList->list "too many arguments"))))
    426426    ))
    427427
     
    468468           (error 'Filter "not a biglist" xs)))))
    469469    (else
    470       (error 'Filter "to many arguments"))
     470      (error 'Filter "too many arguments"))
    471471    ))
    472472
     
    579579         (else
    580580           (error 'Reverse "invalid arguments" xs ys)))))
    581     (else (error 'Reverse "to many arguments"))))
     581    (else (error 'Reverse "too many arguments"))))
    582582
    583583(define (Reverse* xs)
     
    688688             (else #f)))
    689689         (error 'Sorted? "not a finite biglist" xs))))
    690     (else (error 'Sorted? "to many arguments"))))
     690    (else (error 'Sorted? "too many arguments"))))
    691691
    692692(define (Merge <? xs ys)
     
    730730                      (Sort <? (Drop halflen xs))))))
    731731         (error 'Sort "not a finite biglist" xs))))
    732     (else (error 'Sort "to many arguments"))))
     732    (else (error 'Sort "too many arguments"))))
    733733
    734734(define (Every? ok? . xss)
     
    747747             (else #f)))
    748748         (error 'Every? "not a finite biglist" xs))))
    749     (else (error 'Every? "to many arguments"))))
     749    (else (error 'Every? "too many arguments"))))
    750750
    751751(define (Some? ok? . xss)
     
    764764               (loop (Rest xs)))))
    765765         (error 'Some? "not a finite biglist" xs))))
    766     (else (error 'Some? "to many arguments"))))
     766    (else (error 'Some? "too many arguments"))))
    767767
    768768(define (Index ok? . xss)
     
    780780             (else (loop (Rest xs) (+ k 1)))))
    781781         (error 'Index "not a biglist" xs))))
    782     (else (error 'Index "to many arguments"))))
     782    (else (error 'Index "too many arguments"))))
    783783
    784784(define (Memp ok? . xss)
     
    799799             ((ok? (First xs)) xs)
    800800             (else (loop (Rest xs))))))))
    801     (else (error 'Memp "to many arguments"))))
     801    (else (error 'Memp "too many arguments"))))
    802802
    803803(define (Memq var . xss)
     
    853853              (else (loop (Rest xs))))))
    854854         (else (error 'Assp "not a finite biglist" xs)))))
    855     (else (error 'Assp "to many arguments"))
     855    (else (error 'Assp "too many arguments"))
    856856    ))
    857857
     
    871871    ((null? (cdr xss))
    872872     (Filter (o not ok?) (car xss)))
    873     (else (error 'Remp "to many arguements"))))
     873    (else (error 'Remp "too many arguements"))))
    874874
    875875(define (Remove val . xss)
     
    946946;           (Fold-right op (First xs) (Rest xs)))
    947947;         (error 'Fold-ritht0 "not a finite biglist"))))
    948 ;    (else (error 'Fold-right0 "to many arguments"))))
     948;    (else (error 'Fold-right0 "too many arguments"))))
    949949
    950950(define (Fold-left0 op . xss)
     
    975975;           (Fold-left op (First xs) (Rest xs)))
    976976;         (error 'Fold-left0 "not a finite biglist"))))
    977 ;    (else (error 'Fold-left0 "to many arguments"))))
     977;    (else (error 'Fold-left0 "too many arguments"))))
    978978
    979979(define (Scan-right op init . xss)
     
    10781078     (let recur ((x (First xs)))
    10791079       (Cons x (recur (fn x)) #f)))
    1080     (else 'Iterate "to many arguments")))
     1080    (else 'Iterate "too many arguments")))
    10811081
    10821082(define (Cycle xs)
     
    11121112    ))
    11131113
    1114 ;;; (For ((var lst ok? ...) ....) item)
    1115 ;;; ------------------------------------
     1114;;; (For ((var xs ok-xpr ...) (var1 xs1 ok-xpr1 ...) ...) item-xpr)
     1115;;; ---------------------------------------------------------------
    11161116(define-syntax For
    11171117  (syntax-rules ()
    1118    ((_ ((var xs ok? ...)) item)
     1118   ((_ ((var xs ok-xpr ...)) item-xpr)
    11191119    (cond
    11201120      ((Eager? xs)
     
    11231123           '()
    11241124           (let ((var (First seq)))
    1125              (if (and ok? ...)
    1126                (Cons item (recur (Rest seq)))
     1125             (if (and ok-xpr ...)
     1126               (Cons item-xpr (recur (Rest seq)))
    11271127               (recur (Rest seq)))))))
    11281128      ((Lazy? xs)
     
    11311131           eos
    11321132           (let ((var (First seq)))
    1133              (if (and ok? ...)
    1134                (Cons item (recur (Rest seq)) #t)
     1133             (if (and ok-xpr ...)
     1134               (Cons item-xpr (recur (Rest seq)) #t)
    11351135               (recur (Rest seq)))))))
    11361136      (else (error 'For "not a biglist" xs))))
    1137     ((_ ((var xs ok? ...) (var1 xs1 ok1? ...) ...) item)
     1137    ((_ ((var xs ok-xpr ...) (var1 xs1 ok-xpr1 ...) ...) item-xpr)
    11381138     (let recur ((seq xs))
    11391139       (if (Null? seq)
     
    11431143           (else (error 'For "not a biglist" seq)))
    11441144         (let ((var (First seq)))
    1145            (if (and ok? ...)
    1146              (Append (For ((var1 xs1 ok1? ...) ...) item)
     1145           (if (and ok-xpr ...)
     1146             (Append (For ((var1 xs1 ok-xpr1 ...) ...) item-xpr)
    11471147                     (recur (Rest seq)))
    11481148             (recur (Rest seq)))))))
     
    13091309    (For
    13101310      macro:
    1311       (For ((var xs ok? ...) ....) item)
     1311      (For ((var xs ok-xpr ...) (var1 xs1 ok-xpr1 ...) ...) item-xpr)
    13121312      "creates a new list by binding var to each element"
    13131313      "of the list xs in sequence, and if it passes the checks,"
    1314       "ok? ..., inserts item into the result list."
    1315       "The qualifieres, (var xs ok? ...), are processed"
     1314      "ok-xpr ..., inserts the value of item-xpr into the result list."
     1315      "The qualifieres, (var xs ok-xpr ...), are processed"
    13161316      "sequentially from left to right, so that filters of a"
    13171317      "qualifier have access to the variables of qualifiers"
Note: See TracChangeset for help on using the changeset viewer.