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
2 changes: 1 addition & 1 deletion scheme-index-app/src/assets/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -6126,7 +6126,7 @@
, {"kind": "single", "name": "script-file", "signature": {"type": "function", "variants": [{"params": [], "return": {"kind": "or", "items": [{"kind": "return", "type": "string?"}, {"kind": "return", "type": "#f"}]}}]}, "subsignatures": [], "tags": ["pure"], "lib": "(srfi 193)", "description": "Returns an absolute pathname pointing to the calling script. Symbolic links are not resolved.\n(The script may or may not be a command; use command-name to find out.)\nIf the calling program is not a script, #f is returned.\nImplementations must resolve the absolute pathname of a script before running that script. The script may change the working directory, thereby changing the interpretation of relative pathnames."}
, {"kind": "single", "name": "script-directory", "signature": {"type": "function", "variants": [{"params": [], "return": {"kind": "or", "items": [{"kind": "return", "type": "string?"}, {"kind": "return", "type": "#f"}]}}]}, "subsignatures": [], "tags": ["pure"], "lib": "(srfi 193)", "description": "Returns only the non-filename part of script-file as a string. As with script-file, this is an absolute pathname.\nThe string should end with a directory separator (a forward slash on Unix; a backslash on Windows; an appropriate character on other operating systems) so that string-append can be easily used to build pathnames based on it: for example, (string-append (script-directory) \"my-data-file\"). However, if appending such a separator would make the pathname invalid on the underlying operating system, the separator is not added.\nIf the calling program is not a script, #f is returned."}
, {"kind": "single", "name": "range", "signature": {"type": "function", "variants": [{"params": [{"name": "length", "types": ["integer?"]}, {"name": "indexer", "types": ["procedure?"]}], "return": {"kind": "return", "type": "range?"}}]}, "subsignatures": [{"name": "indexer", "signature": {"type": "function", "variants": [{"params": [{"name": "index", "types": ["integer?"]}], "return": {"kind": "return", "type": "*"}}]}}], "tags": ["pure"], "lib": "(srfi 196)", "description": "Returns a range whose length (number of elements) is length. The indexer procedure returns the nth element (where 0 ≤ n < length) of the range, given n. This procedure must run in O(1) time. The range returned is compact, although indexer may close over arbitrarily large data structures. The average accessing time of the resulting range is the average time needed to run indexer."}
, {"kind": "single", "name": "numeric-range", "signature": {"type": "function", "variants": [{"params": [{"name": "start", "types": ["numbger?"]}, {"name": "end", "types": ["numbger?"]}], "return": {"kind": "return", "type": "range?"}}, {"params": [{"name": "start", "types": ["numbger?"]}, {"name": "end", "types": ["numbger?"]}, {"name": "step", "types": ["numbger?"]}], "return": {"kind": "return", "type": "range?"}}]}, "subsignatures": [], "tags": ["pure"], "lib": "(srfi 196)", "description": "Returns a numeric range, a special case of a range specified by an inclusive lower bound start, an exclusive upper bound end, and a step value (default 1), all of which can be exact or inexact real numbers. This constructor produces the sequence\n start, (+ start step), (+ start (* 2 step)), …, (+ start (* n step)), \n\nwhere n is the greatest integer such that (+ start (* n step)) < end if step is positive, or such that (+ start (* n step)) > end if step is negative. It is is an error if an n satisfying this condition cannot be determined, or if step is numerically zero. This procedure must run in O(1) time. The average accessing time of the resulting range must be O(1).\nNote that an effect of this definition is that the elements of a range over inexact numbers are enumerated by multiplying the index by the step value rather than by adding the step value to itself repeatedly. This reduces the likelihood of roundoff errors."}
, {"kind": "single", "name": "numeric-range", "signature": {"type": "function", "variants": [{"params": [{"name": "start", "types": ["number?"]}, {"name": "end", "types": ["number?"]}], "return": {"kind": "return", "type": "range?"}}, {"params": [{"name": "start", "types": ["number?"]}, {"name": "end", "types": ["number?"]}, {"name": "step", "types": ["number?"]}], "return": {"kind": "return", "type": "range?"}}]}, "subsignatures": [], "tags": ["pure"], "lib": "(srfi 196)", "description": "Returns a numeric range, a special case of a range specified by an inclusive lower bound start, an exclusive upper bound end, and a step value (default 1), all of which can be exact or inexact real numbers. This constructor produces the sequence\n start, (+ start step), (+ start (* 2 step)), …, (+ start (* n step)), \n\nwhere n is the greatest integer such that (+ start (* n step)) < end if step is positive, or such that (+ start (* n step)) > end if step is negative. It is is an error if an n satisfying this condition cannot be determined, or if step is numerically zero. This procedure must run in O(1) time. The average accessing time of the resulting range must be O(1).\nNote that an effect of this definition is that the elements of a range over inexact numbers are enumerated by multiplying the index by the step value rather than by adding the step value to itself repeatedly. This reduces the likelihood of roundoff errors."}
, {"kind": "single", "name": "iota-range", "signature": {"type": "function", "variants": [{"params": [{"name": "length", "types": ["integer?"]}], "return": {"kind": "return", "type": "range?"}}, {"params": [{"name": "length", "types": ["integer?"]}, {"name": "start", "types": ["number?"]}], "return": {"kind": "return", "type": "range?"}}, {"params": [{"name": "length", "types": ["integer?"]}, {"name": "start", "types": ["number?"]}, {"name": "step", "types": ["number?"]}], "return": {"kind": "return", "type": "range?"}}]}, "subsignatures": [], "tags": ["pure"], "lib": "(srfi 196)", "description": "Returns an iota-numeric range, a special case of a range specified by a length (a non-negative exact integer) as well as an inclusive lower bound start (default 0) and a step value (default 1), both of which can be exact or inexact real numbers. This constructor produces the sequence\n start, (+ start step), (+ start (* 2 step)), …, (+ start (* (- length 1) step)), \n\nThis procedure must run in O(1) time. The average accessing time of the resulting range must be O(1).\nNote that an effect of this definition is that the elements of a range over inexact numbers are enumerated by multiplying the index by the step value rather than by adding the step value to itself repeatedly. This reduces the likelihood of roundoff errors."}
, {"kind": "single", "name": "vector-range", "signature": {"type": "function", "variants": [{"params": [{"name": "vector", "types": ["vector?"]}], "return": {"kind": "return", "type": "range?"}}]}, "subsignatures": [], "tags": ["pure"], "lib": "(srfi 196)", "description": "Returns a range whose elements are those of vector. The procedure must run in O(1) time. The average accessing time of the resulting range must be O(1). It is an error to mutate vector."}
, {"kind": "single", "name": "string-range", "signature": {"type": "function", "variants": [{"params": [{"name": "string", "types": ["string?"]}], "return": {"kind": "return", "type": "range?"}}]}, "subsignatures": [], "tags": ["pure"], "lib": "(srfi 196)", "description": "Returns a range whose elements are those of string. It is an error to mutate string. This procedure must run in O(n) time, where n is the length of string. The average accessing time of the resulting range must be O(1).\nIn a Scheme that guarantees O(1) random access to strings, range-ref on a range created by string-range can simply call string-ref, and the resulting range is compact. But if only O(n) access is available, this procedure may have to copy the string's characters into a vector, resulting in an expanded range."}
Expand Down
4 changes: 2 additions & 2 deletions types/srfi.196.scm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
(desc . "Returns a range whose length (number of elements) is length. The indexer procedure returns the nth element (where 0 ≤ n < length) of the range, given n. This procedure must run in O(1) time. The range returned is compact, although indexer may close over arbitrarily large data structures. The average accessing time of the resulting range is the average time needed to run indexer."))
((name . "numeric-range")
(signature case-lambda
(((numbger? start) (numbger? end)) range?)
(((numbger? start) (numbger? end) (numbger? step)) range?))
(((number? start) (number? end)) range?)
(((number? start) (number? end) (number? step)) range?))
(tags pure)
(desc . "Returns a numeric range, a special case of a range specified by an inclusive lower bound start, an exclusive upper bound end, and a step value (default 1), all of which can be exact or inexact real numbers. This constructor produces the sequence
start, (+ start step), (+ start (* 2 step)), …, (+ start (* n step)),
Expand Down