Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scheme-index-util/validatedata.scm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ SOFTWARE.
matchable
srfi-1)

(cond-expand
(chicken-6
(import (scheme base)))
(else))

(define (main)
(define filters-index-file-name (list-ref (command-line-arguments) 0))
(define types-index-file-name (list-ref (command-line-arguments) 1))
Expand Down
27 changes: 13 additions & 14 deletions types/srfi.1.scm
Original file line number Diff line number Diff line change
Expand Up @@ -318,27 +318,26 @@
((name . "unfold")
(signature
case-lambda
(((procedure? p) (procedure? f) (procedure? g) seed) list?)
(((procedure? p) (procedure? f) (procedure? g) seed (list? tail-gen)) *))
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed) list?)
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed (list? tail-gen)) *))
(subsigs
(p (lambda (seed) boolean?))
(f (lambda (seed) *))
(g (lambda (seed) *))
(tail-gen (lambda () *)))
(stop? (lambda (seed) boolean?))
(mapper (lambda (seed) *))
(successor (lambda (seed) *))
(tail-mapper (lambda (seed) *)))
(tags pure)
(desc . "unfold is best described by its basic recursion: (unfold p f g seed) = (if (p seed) (tail-gen seed) (cons (f seed) (unfold p f g (g seed)))). p determines when to stop unfolding. f maps each seed value to the corresponding list element. g maps each seed value to next seed value. seed the \"state\" value for the unfold. tail-gen creates the tail of the list; defaults to (lambda (x) '()). In other words, we use g to generate a sequence of seed values seed, g(seed), g2(seed), g3(seed), ... These seed values are mapped to list elements by f, producing the elements of the result list in a left-to-right order. P says when to stop. unfold is the fundamental recursive list constructor, just as fold-right is the fundamental recursive list consumer."))
(desc . "unfold is best described by its basic recursion: (unfold stop? mapper successor seed) = (if (stop? seed) (tail-mapper seed) (cons (mapper seed) (unfold stop? mapper successor (successor seed)))). stop? determines when to stop unfolding. mapper maps each seed value to the corresponding list element. successor maps each seed value to next seed value. seed the \"state\" value for the unfold. tail-mapper creates the tail of the list; defaults to (lambda (x) '()). In other words, we use successor to generate a sequence of seed values seed, successor(seed), successor2(seed), successor3(seed), ... These seed values are mapped to list elements by mapper, producing the elements of the result list in a left-to-right order. stop? says when to stop. unfold is the fundamental recursive list constructor, just as fold-right is the fundamental recursive list consumer."))
((name . "unfold-right")
(signature
case-lambda
(((procedure? p) (procedure? f) (procedure? g) seed) list?)
(((procedure? p) (procedure? f) (procedure? g) seed (list? tail-gen)) *))
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed) list?)
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed (list? tail)) list?))
(subsigs
(p (lambda (seed) boolean?))
(f (lambda (seed) *))
(g (lambda (seed) *))
(tail-gen (lambda () *)))
(stop? (lambda (seed) boolean?))
(mapper (lambda (seed) *))
(successor (lambda (seed) *)))
(tags pure)
(desc . "unfold-right constructs a list with the following loop: (let lp ((seed seed) (lis tail)) (if (p seed) lis (lp (g seed) (cons (f seed) lis)))). p determines when to stop unfolding. f maps each seed value to the corresponding list element. g maps each seed value to next seed value. seed the \"state\" value for the unfold. tail list terminator; defaults to '(). In other words, we use g to generate a sequence of seed values seed, g(seed), g2(seed), g3(seed), ... These seed values are mapped to list elements by f, producing the elements of the result list in a right-to-left order. P says when to stop. unfold-right is the fundamental iterative list constructor, just as fold is the fundamental iterative list consumer."))
(desc . "unfold-right constructs a list with the following loop: (let lp ((seed seed) (lis tail)) (if (stop? seed) lis (lp (successor seed) (cons (mapper seed) lis)))). stop? determines when to stop unfolding. mapper maps each seed value to the corresponding list element. successor maps each seed value to next seed value. seed the \"state\" value for the unfold. tail list terminator; defaults to '(). In other words, we use successor to generate a sequence of seed values seed, successor(seed), successor2(seed), successor3(seed), ... These seed values are mapped to list elements by mapper, producing the elements of the result list in a right-to-left order. stop? says when to stop. unfold-right is the fundamental iterative list constructor, just as fold is the fundamental iterative list consumer."))
((name . "map")
(signature lambda ((procedure? proc) (list? list1) (list? list2) ...) list?)
(subsigs (proc (lambda (obj1 obj2 ...) *)))
Expand Down
44 changes: 22 additions & 22 deletions types/srfi.13.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1005,50 +1005,50 @@ If no match is found, the functions return false. The start and end parameters s
((name . "string-unfold")
(signature
case-lambda
(((procedure? p) (procedure? f) (procedure? g) seed) string?)
(((procedure? p) (procedure? f) (procedure? g) seed (string? base)) string?)
(((procedure? p)
(procedure? f)
(procedure? g)
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed) string?)
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed (string? base)) string?)
(((procedure? stop?)
(procedure? mapper)
(procedure? successor)
seed
(string? base)
(procedure? make-final))
string?))
(subsigs
(p (lambda (seed) boolean?))
(f (lambda (seed) *))
(g (lambda (seed) *))
(stop? (lambda (seed) boolean?))
(mapper (lambda (seed) *))
(successor (lambda (seed) *))
(make-final (lambda (seed) string?)))
(tags pure)
(desc . "This is a fundamental constructor for strings.
* G is used to generate a series of \"seed\" values from the initial seed: seed, (g seed), (g^2 seed), (g^3 seed), ...
* P tells us when to stop -- when it returns true when applied to one of these seed values.
* F maps each seed value to the corresponding character in the result string. These chars are assembled into the string in a left-to-right order.
* successor is used to generate a series of \"seed\" values from the initial seed: seed, (successor seed), (successor^2 seed), (successor^3 seed), ...
* stop? tells us when to stop -- when it returns true when applied to one of these seed values.
* mapper maps each seed value to the corresponding character in the result string. These chars are assembled into the string in a left-to-right order.
* Base is the optional initial/leftmost portion of the constructed string; it defaults to the empty string \"\".
* Make-final is applied to the terminal seed value (on which p returns true) to produce the final/rightmost portion of the constructed string. It defaults to (lambda (x) \"\").
The final string constructed does not share storage with either base or the value produced by make-final."))
((name . "string-unfold-right")
(signature
case-lambda
(((procedure? p) (procedure? f) (procedure? g) seed) string?)
(((procedure? p) (procedure? f) (procedure? g) seed (string? base)) string?)
(((procedure? p)
(procedure? f)
(procedure? g)
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed) string?)
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed (string? base)) string?)
(((procedure? stop?)
(procedure? mapper)
(procedure? successor)
seed
(string? base)
(procedure? make-final))
string?))
(subsigs
(p (lambda (seed) boolean?))
(f (lambda (seed) *))
(g (lambda (seed) *))
(stop? (lambda (seed) boolean?))
(mapper (lambda (seed) *))
(successor (lambda (seed) *))
(make-final (lambda (seed) string?)))
(tags pure)
(desc . " This is a fundamental constructor for strings.
* G is used to generate a series of \"seed\" values from the initial seed: seed, (g seed), (g2 seed), (g3 seed), ...
* P tells us when to stop -- when it returns true when applied to one of these seed values.
* F maps each seed value to the corresponding character in the result string. These chars are assembled into the string in a right-to-left order.
* successor is used to generate a series of \"seed\" values from the initial seed: seed, (successor seed), (successor2 seed), (successor3 seed), ...
* stop? tells us when to stop -- when it returns true when applied to one of these seed values.
* mapper maps each seed value to the corresponding character in the result string. These chars are assembled into the string in a right-to-left order.
* Base is the optional initial/rightmost portion of the constructed string; it defaults to the empty string \"\".
* Make-final is applied to the terminal seed value (on which P returns true) to produce the final/leftmost portion of the constructed string. It defaults to (lambda (x) \"\").
The final string constructed does not share storage with either base or the value produced by make-final."))
Expand Down
24 changes: 12 additions & 12 deletions types/srfi.14.scm
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,28 @@
((group ((name . "char-set-unfold")
(signature
case-lambda
(((procedure? f) (procedure? p) (procedure? g) seed) char-set?)
(((procedure? f) (procedure? p) (procedure? g) seed (char-set? base-cs))
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed) char-set?)
(((procedure? stop?) (procedure? mapper) (procedure? successor) seed (char-set? base-cs))
char-set?))
(subsigs
(f (lambda (seed) char?))
(p (lambda (seed) boolean?))
(g (lambda (seed) *)))
(stop? (lambda (seed) boolean?))
(mapper (lambda (seed) char?))
(successor (lambda (seed) *)))
(tags pure))
((name . "char-set-unfold!")
(signature
lambda
((procedure? f) (procedure? p) (procedure? g) seed (char-set? base-cs))
((procedure? stop?) (procedure? mapper) (procedure? successor) seed (char-set? base-cs))
char-set?)
(subsigs
(f (lambda (seed) char?))
(p (lambda (seed) boolean?))
(g (lambda (seed) *)))
(stop? (lambda (seed) boolean?))
(mapper (lambda (seed) char?))
(successor (lambda (seed) *)))
(tags pure)))
(desc . "This is a fundamental constructor for char-sets.
* G is used to generate a series of \"seed\" values from the initial seed: seed, (g seed), (g2 seed), (g3 seed), ...
* P tells us when to stop -- when it returns true when applied to one of these seed values.
* F maps each seed value to a character. These characters are added to the base character set base-cs to form the result; base-cs defaults to the empty set. char-set-unfold! adds the characters to base-cs in a linear-update -- it is allowed, but not required, to side-effect and use base-cs's storage to construct the result."))
* successor is used to generate a series of \"seed\" values from the initial seed: seed, (successor seed), (successor2 seed), (successor3 seed), ...
* stop? tells us when to stop -- when it returns true when applied to one of these seed values.
* mapper maps each seed value to a character. These characters are added to the base character set base-cs to form the result; base-cs defaults to the empty set. char-set-unfold! adds the characters to base-cs in a linear-update -- it is allowed, but not required, to side-effect and use base-cs's storage to construct the result."))
((name . "char-set-for-each")
(signature lambda ((procedure? proc) (char-set? cs)) undefined)
(subsigs (proc (lambda ((char? c)) undefined)))
Expand Down
Loading