Changeset 39209 in project


Ignore:
Timestamp:
11/10/20 19:23:21 (3 weeks ago)
Author:
Zipheir
Message:

Fix formatting of paragraph text and remove SRFI 42 implementation suggestions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/srfi-196

    r39194 r39209  
    1616=== Specification
    1717==== Preliminary notes
    18 ===== Ranges belong to a disjoint type.
    19 ===== Ranges provide certain running time guarantees.
    20 ===== With each range, we associate two lengths of time, the average accessing time and the total accessing time.
     18Ranges belong to a disjoint type.
     19
     20Ranges provide certain running time guarantees. With each range, we associate two lengths of time, the average accessing time and the total accessing time.
    2121The total accessing time is the average accessing time multiplied by the length of the range. In the runtime guarantees below, the time spent in arguments designated by {{pred}}, equal, or {{proc}} is ignored.
    22 ===== Unless otherwise noted, procedures in this SRFI that return ranges allocate at most O(1) new locations (see R[57]RS section 3.4 for further information). Such ranges are known as compact ranges. Procedures marked as returning expanded ranges allocate at most O(n) locations, where {{n}} is the number of elements in the range.
    23 ===== This SRFI recommends, but does not require, that Scheme implementations which also provide SRFI 42 modify it so that the typed generator :range also accepts a single argument which is a range in the sense of this SRFI. This feature should be used with caution, as SRFI 42 loops expect that :range iterates only over exact rationals.
    24 ===== The following names are used for arguments to procedures:
     22
     23Unless otherwise noted, procedures in this SRFI that return ranges allocate at most O(1) new locations (see R[57]RS section 3.4 for further information). Such ranges are known as compact ranges. Procedures marked as returning expanded ranges allocate at most O(n) locations, where {{n}} is the number of elements in the range.
     24
     25The following names are used for arguments to procedures:
    2526
    2627<parameter>obj</parameter>
     
    5960
    6061A Scheme string.
    61 ===== It is an error (unless otherwise noted) if the procedures are passed arguments that do not have the type implied by the argument names.
     62
     63It is an error (unless otherwise noted) if the procedures are passed arguments that do not have the type implied by the argument names.
     64
    6265==== Constructors
    6366
     
    6568
    6669Returns 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.
    67 ====== Examples:
     70
     71====== Examples
    6872<enscript highlight="scheme">
    6973(range->list (range 26 (lambda (n) (integer->char (+ 65 n)))))
Note: See TracChangeset for help on using the changeset viewer.