Changeset 39473 in project


Ignore:
Timestamp:
12/30/20 20:01:25 (4 weeks ago)
Author:
Zipheir
Message:

Use italics for arguments; other minor fixes.

File:
1 edited

Legend:

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

    r39242 r39473  
    9292<procedure>(text? obj) → boolean</procedure>
    9393
    94 Is {{obj}} an immutable text? In particular, {{(text? obj)}}
    95 returns false if {{(string? obj)}} returns true, which
     94Is ''obj'' an immutable text? In particular, {{(text?}} ''obj''{{)}}
     95returns false if {{(string?}} ''obj''{{)}} returns true, which
    9696implies {{string?}} returns false if {{text?}} returns true.
    9797
    9898<procedure>(textual? obj) → boolean</procedure>
    9999
    100 Returns true if and only {{obj}} is an immutable text or a string.
     100Returns true if and only ''obj'' is an immutable text or a string.
    101101
    102102<procedure>(textual-null? text) → boolean</procedure>
    103103
    104 Is {{text}} the empty text?
     104Is ''text'' the empty text?
    105105
    106106<procedure>(textual-every pred textual [start end]) → value</procedure>
    107107<procedure>(textual-any pred textual [start end]) → value</procedure>
    108108
    109 Checks to see if every/any character in {{textual}} satisfies
    110 {{pred}}, proceeding from left (index {{start}}) to right (index
    111 {{end}}). These procedures are short-circuiting: if {{pred}} returns
    112 false, {{textual-every}} does not call {{pred}} on subsequent characters;
    113 if {{pred}} returns true, {{textual-any}} does not call {{pred}} on
     109Checks to see if every/any character in ''textual'' satisfies
     110''pred'', proceeding from left (index ''start'') to right (index
     111''end''). These procedures are short-circuiting: if ''pred'' returns
     112false, {{textual-every}} does not call ''pred'' on subsequent characters;
     113if ''pred'' returns true, {{textual-any}} does not call ''pred'' on
    114114subsequent characters; Both procedures are "witness-generating":
    115115
    116 * If {{textual-every}} is given an empty interval (with {{start}} = {{end}}), it returns {{#t}}.
    117 
    118 * If {{textual-every}} returns true for a non-empty interval (with {{start}} < {{end}}), the returned true value is the one returned by the final call to the predicate on {{(text-ref (textual-copy text) (- end 1))}}.
     116* If {{textual-every}} is given an empty interval (with ''start'' = ''end''), it returns {{#t}}.
     117
     118* If {{textual-every}} returns true for a non-empty interval (with ''start'' < ''end''), the returned true value is the one returned by the final call to the predicate on {{(text-ref (textual-copy}} ''text''{{) (-}} ''end'' {{1))}}.
    119119
    120120* If {{textual-any}} returns true, the returned true value is the one returned by the predicate.
     
    137137<procedure>(text-tabulate proc len) → text</procedure>
    138138
    139 {{proc}} is a procedure that accepts an exact integer as its
     139''proc'' is a procedure that accepts an exact integer as its
    140140argument and returns a character. Constructs a text of
    141 size {{len}} by calling {{proc}} on each value from 0 (inclusive)
    142 to {{len}} (exclusive) to produce the corresponding element
    143 of the text. The order in which {{proc}} is called on those
     141size ''len'' by calling ''proc'' on each value from 0 (inclusive)
     142to ''len'' (exclusive) to produce the corresponding element
     143of the text. The order in which ''proc'' is called on those
    144144indexes is not specified.
    145145
     
    147147This is a fundamental constructor for texts.
    148148
    149 * {{successor}} is used to generate a series of "seed" values from the initial seed: {{seed}}, {{(successor seed)}}, {{(successor^2 seed)}}, {{(successor^3 seed)}}, ...
    150 
    151 * {{stop?}} tells us when to stop — when it returns true when applied to one of these seed values.
    152 
    153 * {{mapper}} maps each seed value to the corresponding character(s) in the result text, which are assembled into that text in left-to-right order. It is an error for {{mapper}} to return anything other than a character, string, or text.
    154 
    155 * {{base}} is the optional initial/leftmost portion of the constructed text, which defaults to the empty text {{(text)}}. It is an error if base is anything other than a character, string, or text.
    156 
    157 * {{make-final}} is applied to the terminal seed value (on which {{stop?}} returns true) to produce the final/rightmost portion of the constructed text. It defaults to {{(lambda (x) (text))}}. It is an error for {{make-final}} to return anything other than a character, string, or text.
     149* ''successor'' is used to generate a series of "seed" values from the initial seed: ''seed'', (''successor seed''), (''successor''^2 ''seed''), (''successor''^3 ''seed''), ...
     150
     151* ''stop?'' tells us when to stop — when it returns true when applied to one of these seed values.
     152
     153* ''mapper'' maps each seed value to the corresponding character(s) in the result text, which are assembled into that text in left-to-right order. It is an error for ''mapper'' to return anything other than a character, string, or text.
     154
     155* ''base'' is the optional initial/leftmost portion of the constructed text, which defaults to the empty text {{(text)}}. It is an error if base is anything other than a character, string, or text.
     156
     157* ''make-final'' is applied to the terminal seed value (on which ''stop?'' returns true) to produce the final/rightmost portion of the constructed text. It defaults to {{(lambda (x) (text))}}. It is an error for ''make-final'' to return anything other than a character, string, or text.
    158158
    159159{{text-unfold}} is a fairly powerful text constructor. You
     
    179179
    180180This is a fundamental constructor for texts. It is the
    181 same as {{text-unfold}} except the results of {{mapper}} are
    182 assembled into the text in right-to-left order, {{base}} is
     181same as {{text-unfold}} except the results of ''mapper'' are
     182assembled into the text in right-to-left order, ''base'' is
    183183the optional rightmost portion of the constructed text,
    184 and {{make-final}} produces the leftmost portion of the
     184and ''make-final'' produces the leftmost portion of the
    185185constructed text.
    186186
     
    298298
    299299{{textual-length}} returns the number of characters in
    300 {{textual}}, and {{textual-ref}} returns the character at
    301 character index {{idx}}, using 0-origin indexing. These
     300''textual'', and {{textual-ref}} returns the character at
     301character index ''idx'', using 0-origin indexing. These
    302302procedures are the generalizations of {{text-length}} and
    303 {{text-ref}} to accept strings as well as texts. If {{textual}}
     303{{text-ref}} to accept strings as well as texts. If ''textual''
    304304is a text, they must execute in O(1) time, but there is
    305 no such requirement if {{textual}} is a string.
     305no such requirement if ''textual'' is a string.
    306306
    307307<procedure>(subtext text start end) → text</procedure>
     
    309309
    310310These procedures return a text containing the characters
    311 of {{text}} or {{textual}} beginning with index {{start}} (inclusive)
    312 and ending with index {{end}} (exclusive).
    313 
    314 If {{textual}} is a string, then that string does not share any
     311of ''text'' or ''textual'' beginning with index ''start'' (inclusive)
     312and ending with index ''end'' (exclusive).
     313
     314If ''textual'' is a string, then that string does not share any
    315315storage with the result, so subsequent mutation of that
    316316string will not affect the text returned by {{subtextual}}.
     
    318318{{subtext}}, the implementation returns a result that shares
    319319storage with that text. These procedures just return their
    320 first argument when that argument is a text, {{start}} is 0, and
    321 {{end}} is the length of that text.
     320first argument when that argument is a text, ''start'' is 0, and
     321''end'' is the length of that text.
    322322
    323323<procedure>(textual-copy textual [start end]) → text</procedure>
    324324
    325 Returns a text containing the characters of {{textual}}
    326 beginning with index {{start}} (inclusive) and ending with
    327 index {{end}} (exclusive).
     325Returns a text containing the characters of ''textual''
     326beginning with index ''start'' (inclusive) and ending with
     327index ''end'' (exclusive).
    328328
    329329Unlike {{subtext}} and {{subtextual}}, the result of {{textual-copy}}
     
    333333
    334334If {{textual-copy}} returns an empty text, that empty text
    335 may be {{eq?}} or {{eqv?}} to the text returned by {{(text)}}.
     335may be {{eq?}} or {{eqv?}} to the text returned by ''(text)''.
    336336If the text returned by {{textual-copy}} is non-empty, then it
    337337is not {{eqv?}} to any previously extant object.
     
    342342<procedure>(textual-drop-right textual nchars) → text</procedure>
    343343
    344 {{textual-take}} returns a text containing the first {{nchars}}
    345 of {{textual}}; {{textual-drop}} returns a text containing all
    346 but the first {{nchars}} of {{textual}}. {{textual-take-right}}
    347 returns a text containing the last {{nchars}} of {{textual}};
     344{{textual-take}} returns a text containing the first ''nchars''
     345of ''textual''; {{textual-drop}} returns a text containing all
     346but the first ''nchars'' of ''textual''. {{textual-take-right}}
     347returns a text containing the last ''nchars'' of ''textual'';
    348348{{textual-drop-right}} returns a text containing all but the
    349 last {{nchars}} of {{textual}}.
    350 
    351 If {{textual}} is a string, then that string does not share
     349last ''nchars'' of ''textual''.
     350
     351If ''textual'' is a string, then that string does not share
    352352any storage with the result, so subsequent mutation of
    353353that string will not affect the text returned by these
    354 procedures. If {{textual}} is a text, the result shares storage with
     354procedures. If ''textual'' is a text, the result shares storage with
    355355that text.
    356356
     
    370370<procedure>(textual-pad-right textual len [char start end]) → text</procedure>
    371371
    372 Returns a text of length {{len}} comprised of the characters
    373 drawn from the given subrange of {{textual}}, padded on the
    374 left (right) by as many occurrences of the character {{char}}
    375 as needed. If {{textual}} has more than {{len}} chars, it is
    376 truncated on the left (right) to length {{len}}. {{char}}
     372Returns a text of length ''len'' comprised of the characters
     373drawn from the given subrange of ''textual'', padded on the
     374left (right) by as many occurrences of the character ''char''
     375as needed. If ''textual'' has more than ''len'' chars, it is
     376truncated on the left (right) to length ''len''. ''char''
    377377defaults to {{#\space}}.
    378378
    379 If {{textual}} is a string, then that string does not share
     379If ''textual'' is a string, then that string does not share
    380380any storage with the result, so subsequent mutation of
    381381that string will not affect the text returned by these
    382 procedures. If {{textual}} is a text, the result shares storage
     382procedures. If ''textual'' is a text, the result shares storage
    383383with that text whenever sharing would be space-efficient.
    384384
     
    394394
    395395Returns a text obtained from the given subrange of
    396 {{textual}} by skipping over all characters on the left / on
     396''textual'' by skipping over all characters on the left / on
    397397the right / on both sides that satisfy the second
    398 argument {{pred}}: {{pred}} defaults to {{char-whitespace?}}.
    399 
    400 If {{textual}} is a string, then that string does not share
     398argument ''pred'': ''pred'' defaults to {{char-whitespace?}}.
     399
     400If ''textual'' is a string, then that string does not share
    401401any storage with the result, so subsequent mutation of
    402402that string will not affect the text returned by these
    403 procedures. If {{textual}} is a text, the result shares storage
     403procedures. If ''textual'' is a text, the result shares storage
    404404with that text whenever sharing would be space-efficient.
    405405
     
    420420</enscript>
    421421
    422 That is, the segment of characters in {{textual1}} from
    423 {{start1}} to {{end1}} is replaced by the segment of characters
    424 in {{textual2}} from {{start2}} to {{end2}}. If {{start1}} = {{end1}},
    425 this simply splices the characters drawn from {{textual2}} into
    426 {{textual1}} at that position.
     422That is, the segment of characters in ''textual1'' from
     423''start1'' to ''end1'' is replaced by the segment of characters
     424in ''textual2'' from ''start2'' to ''end2''. If ''start1'' = ''end1'',
     425this simply splices the characters drawn from ''textual2'' into
     426''textual1'' at that position.
    427427
    428428Examples:
     
    488488These procedures behave as though they had called
    489489{{textual-foldcase}} on their arguments before applying the
    490 corresponding procedures without "-ci".
     490corresponding procedures without "{{-ci}}".
    491491
    492492=== Prefixes & suffixes
     
    496496
    497497Return the length of the longest common prefix/suffix of
    498 {{textual1}} and {{textual2}}. For prefixes, this is equivalent
     498''textual1'' and ''textual2''. For prefixes, this is equivalent
    499499to their "mismatch index" (relative to the start
    500500indexes).
    501501
    502 The optional {{start}}/{{end}} indexes restrict the comparison to
    503 the indicated subtexts of {{textual1}} and {{textual2}}.
     502The optional ''start''/''end'' indexes restrict the comparison to
     503the indicated subtexts of ''textual1'' and ''textual2''.
    504504
    505505<procedure>(textual-prefix? textual1 textual2 [start1 end1 start2 end2]) → boolean</procedure>
    506506<procedure>(textual-suffix? textual1 textual2 [start1 end1 start2 end2]) → boolean</procedure>
    507507
    508 Is {{textual1}} a prefix/suffix of {{textual2}}?
     508Is ''textual1'' a prefix/suffix of ''textual2''?
    509509
    510510The optional start/end indexes restrict the comparison to
    511 the indicated subtexts of {{textual1}} and {{textual2}}.
     511the indicated subtexts of ''textual1'' and ''textual2''.
    512512
    513513=== Searching
     
    518518<procedure>(textual-skip-right textual pred [start end]) → idx-or-false</procedure>
    519519
    520 {{textual-index}} searches through the given subtext or
     520''textual-index'' searches through the given subtext or
    521521substring from the left, returning the index of the
    522 leftmost character satisfying the predicate {{pred}}.
     522leftmost character satisfying the predicate ''pred''.
    523523{{textual-index-right}} searches from the right, returning
    524524the index of the rightmost character satisfying the
    525 predicate {{pred}}. If no match is found, these procedures
     525predicate ''pred''. If no match is found, these procedures
    526526return {{#f}}.
    527527
    528 The {{start}} and {{end}} arguments specify the beginning and end
     528The ''start'' and ''end'' arguments specify the beginning and end
    529529of the search; the valid indexes relevant to the search
    530 include {{start}} but exclude {{end}}. Beware of "fencepost"
     530include ''start'' but exclude ''end''. Beware of "fencepost"
    531531errors: when searching right-to-left, the first index
    532 considered is {{(- end 1)}}, whereas when searching
    533 left-to-right, the first index considered is {{start}}. That
     532considered is {{(-}} ''end'' {{1)}}, whereas when searching
     533left-to-right, the first index considered is ''start''. That
    534534is, the start/end indexes describe the same half-open
    535 interval [start,end) in these procedures that they do in
     535interval [''start'',''end'') in these procedures that they do in
    536536all other procedures specified by this SRFI.
    537537
    538538The skip functions are similar, but use the complement of
    539539the criterion: they search for the first char that
    540 doesn't satisfy {{pred}}. To skip over initial whitespace,
     540doesn't satisfy ''pred''. To skip over initial whitespace,
    541541for example, say
    542542
     
    556556<procedure>(textual-contains-right textual1 textual2 [start1 end1 start2 end2]) → idx-or-false</procedure>
    557557
    558 Does the subtext of {{textual1}} specified by {{start1}} and {{end1}}
     558Does the subtext of ''textual1'' specified by ''start1'' and ''end1''
    559559contain the sequence of characters given by the subtext
    560 of {{textual2}} specified by {{start2}} and {{end2}}?
    561 
    562 Returns {{#f}} if there is no match. If {{start2}} = {{end2}},
    563 {{textual-contains}} returns {{start1}} but
    564 {{textual-contains-right}} returns {{end1}}. Otherwise returns
    565 the index in {{textual1}} for the first character of the
     560of ''textual2'' specified by ''start2'' and ''end2''?
     561
     562Returns {{#f}} if there is no match. If ''start2'' = ''end2'',
     563{{textual-contains}} returns ''start1'' but
     564{{textual-contains-right}} returns ''end1''. Otherwise returns
     565the index in ''textual1'' for the first character of the
    566566first/last match; that index lies within the half-open
    567 interval {{[start1,end1)}}, and the match lies entirely
    568 within the {{[start1,end1)}} range of {{textual1}}.
     567interval [''start1'',''end1''), and the match lies entirely
     568within the [''start1'',''end1'') range of ''textual1''.
    569569
    570570<enscript highlight="scheme">
     
    617617(textual-concatenate (reverse textual-list))
    618618</enscript>
    619 If the optional argument {{final-textual}} is specified, it
    620 is effectively consed onto the beginning of {{textual-list}}
     619If the optional argument ''final-textual'' is specified, it
     620is effectively consed onto the beginning of ''textual-list''
    621621before performing the list-reverse and
    622622{{textual-concatenate}} operations.
    623623
    624 If the optional argument {{end}} is given, only the
    625 characters up to but not including {{end}} in {{final-textual}}
     624If the optional argument ''end'' is given, only the
     625characters up to but not including ''end'' in ''final-textual''
    626626are added to the result, thus producing
    627627<enscript highlight="scheme">
     
    641641together using the delimiter text.
    642642
    643 {{textual-list}} is a list of texts and/or strings. {{delimiter}}
    644 is a text or a string. The {{grammar}} argument is a symbol
     643''textual-list'' is a list of texts and/or strings. ''delimiter''
     644is a text or a string. The ''grammar'' argument is a symbol
    645645that determines how the delimiter is used, and defaults
    646 to {{'infix}}. It is an error for {{grammar}} to be any symbol
     646to {{infix}}. It is an error for ''grammar'' to be any symbol
    647647other than these four:
    648648
    649 * {{'infix}} means an infix or separator grammar: insert the delimiter between list elements. An empty list will produce an empty text.
    650 
    651 * {{'strict-infix}} means the same as 'infix if the textual-list is non-empty, but will signal an error if given an empty list. (This avoids an ambiguity shown in the examples below.)
    652 
    653 * {{'suffix}} means a suffix or terminator grammar: insert the delimiter after every list element.
    654 
    655 * {{'prefix}} means a prefix grammar: insert the delimiter before every list element.
     649* {{infix}} means an infix or separator grammar: insert the delimiter between list elements. An empty list will produce an empty text.
     650
     651* {{strict-infix}} means the same as {{infix}} if the textual-list is non-empty, but will signal an error if given an empty list. (This avoids an ambiguity shown in the examples below.)
     652
     653* {{suffix}} means a suffix or terminator grammar: insert the delimiter after every list element.
     654
     655* {{prefix}} means a prefix grammar: insert the delimiter before every list element.
    656656
    657657The delimiter is the text used to delimit elements; it
     
    680680These are the fundamental iterators for texts.
    681681
    682 The {{textual-fold}} procedure maps the {{kons}} procedure across
     682The ''textual-fold'' procedure maps the ''kons'' procedure across
    683683the given text or string from left to right:
    684684
     
    687687</enscript>
    688688
    689 In other words, {{textual-fold}} obeys the (tail) recursion
     689In other words, ''textual-fold'' obeys the (tail) recursion
    690690
    691691<enscript highlight="scheme">
     
    693693</enscript>
    694694
    695 The {{textual-fold-right}} procedure maps {{kons}} across the
     695The {{textual-fold-right}} procedure maps ''kons'' across the
    696696given text or string from right to left:
    697697
     
    727727<procedure>(textual-map proc textual1 textual2 ...) → text</procedure>
    728728
    729 It is an error if {{proc}} does not accept as many arguments
    730 as the number of {{textual}} arguments passed to {{textual-map}},
     729It is an error if ''proc'' does not accept as many arguments
     730as the number of ''textual'' arguments passed to {{textual-map}},
    731731does not accept characters as arguments, or returns a
    732732value that is not a character, string, or text.
    733733
    734 The textual-map procedure applies {{proc}} element-wise to
    735 the characters of the {{textual}} arguments, converts each
    736 value returned by {{proc}} to a text, and returns the
    737 concatenation of those texts. If more than one {{textual}}
     734The textual-map procedure applies ''proc'' element-wise to
     735the characters of the ''textual'' arguments, converts each
     736value returned by ''proc'' to a text, and returns the
     737concatenation of those texts. If more than one ''textual''
    738738argument is given and not all have the same length, then
    739 {{textual-map}} terminates when the shortest {{textual}} argument
    740 runs out. The dynamic order in which {{proc}} is called on
    741 the characters of the {{textual}} arguments is unspecified,
     739{{textual-map}} terminates when the shortest ''textual'' argument
     740runs out. The dynamic order in which ''proc'' is called on
     741the characters of the ''textual'' arguments is unspecified,
    742742as is the dynamic order in which the coercions are
    743 performed. If any strings returned by {{proc}} are mutated
     743performed. If any strings returned by ''proc'' are mutated
    744744after they have been returned and before the call to
    745745{{textual-map}} has returned, then {{textual-map}} returns a text
     
    763763<procedure>(textual-for-each proc textual1 textual2 ...) → unspecified</procedure>
    764764
    765 It is an error if {{proc}} does not accept as many arguments
    766 as the number of {{textual}} arguments passed to {{textual-for-each}}
     765It is an error if ''proc'' does not accept as many arguments
     766as the number of ''textual'' arguments passed to {{textual-for-each}}
    767767or does not accept characters as arguments.
    768768
    769 The {{textual-for-each}} procedure applies {{proc}} element-wise
    770 to the characters of the {{textual}} arguments, going from
    771 left to right. If more than one {{textual}} argument is given
     769The {{textual-for-each}} procedure applies ''proc'' element-wise
     770to the characters of the ''textual'' arguments, going from
     771left to right. If more than one ''textual'' argument is given
    772772and not all have the same length, then {{textual-for-each}}
    773 terminates when the shortest {{textual}} argument runs out.
     773terminates when the shortest ''textual'' argument runs out.
    774774
    775775<procedure>(textual-map-index proc textual [start end]) → text</procedure>
    776776
    777 Calls {{proc}} on each valid index of the specified subtext
     777Calls ''proc'' on each valid index of the specified subtext
    778778or substring, converts the results of those calls into
    779779texts, and returns the concatenation of those texts. It
    780 is an error for {{proc}} to return anything other than a
     780is an error for ''proc'' to return anything other than a
    781781character, string, or text. The dynamic order in which
    782 {{proc}} is called on the indexes is unspecified, as is the
     782''proc'' is called on the indexes is unspecified, as is the
    783783dynamic order in which the coercions are performed. If
    784 any strings returned by {{proc}} are mutated after they have
     784any strings returned by ''proc'' are mutated after they have
    785785been returned and before the call to {{textual-map-index}}
    786786has returned, then {{textual-map-index}} returns a text with
     
    790790<procedure>(textual-for-each-index proc textual [start end]) → unspecified</procedure>
    791791
    792 Calls {{proc}} on each valid index of the specified subtext
     792Calls ''proc'' on each valid index of the specified subtext
    793793or substring, in increasing order, discarding the results
    794794of those calls. This is simply a safe and correct way to
     
    815815<procedure>(textual-remove pred textual [start end]) → text</procedure>
    816816
    817 Filter the given subtext of {{textual}}, retaining only those
    818 characters that satisfy / do not satisfy {{pred}}.
    819 
    820 If {{textual}} is a string, then that string does not share
     817Filter the given subtext of ''textual'', retaining only those
     818characters that satisfy / do not satisfy ''pred''.
     819
     820If ''textual'' is a string, then that string does not share
    821821any storage with the result, so subsequent mutation of
    822822that string will not affect the text returned by these
    823 procedures. If {{textual}} is a text, the result shares storage
     823procedures. If ''textual'' is a text, the result shares storage
    824824with that text whenever sharing would be space-efficient.
    825825
     
    831831replicated copying of a subtext or substring.
    832832
    833 {{textual}} is a text or string; {{start}} and {{end}} are optional
    834 arguments that specify a subtext of {{textual}}, defaulting
    835 to 0 and the length of {{textual}}. This subtext is
     833''textual'' is a text or string; ''start'' and ''end'' are optional
     834arguments that specify a subtext of ''textual'', defaulting
     835to 0 and the length of ''textual''. This subtext is
    836836conceptually replicated both up and down the index space,
    837837in both the positive and negative directions. For
    838 example, if {{textual}} is {{"abcdefg"}}, {{start}} is 3, and {{end}}
     838example, if ''textual'' is {{"abcdefg"}}, ''start'' is 3, and ''end''
    839839is 6, then we have the conceptual bidirectionally-infinite
    840840text
     
    844844
    845845{{textual-replicate}} returns the subtext of this text
    846 beginning at index {{from}}, and ending at {{to}}. It is an error
    847 if {{from}} is greater than {{to}}.
     846beginning at index ''from'', and ending at ''to''. It is an error
     847if ''from'' is greater than ''to''.
    848848
    849849You can use {{textual-replicate}} to perform a variety of
    850850tasks:
    851851
    852 * To rotate a text left: {{(textual-replicate "abcdef" 2 8) â‡’ «cdefab»}}
    853 
    854 * To rotate a text right: {{(textual-replicate "abcdef" -2 4) â‡’ «efabcd»}}
    855 
    856 * To replicate a text: {{(textual-replicate "abc" 0 7) â‡’ «abcabca»}}
     852* To rotate a text left: {{(textual-replicate "abcdef" 2 8)}} ⇒ {{«cdefab»}}
     853
     854* To rotate a text right: {{(textual-replicate "abcdef" -2 4)}} ⇒ {{«efabcd»}}
     855
     856* To replicate a text: {{(textual-replicate "abc" 0 7)}} ⇒ {{«abcabca»}}
    857857
    858858Note that
    859859
    860 * The {{from}}/{{to}} arguments give a half-open range containing the characters from index {{from}} up to, but not including, index {{to}}.
    861 
    862 * The {{from}}/{{to}} indexes are not expressed in the index space of {{textual}}. They refer instead to the replicated index space of the subtext defined by {{textual}}, {{start}}, and {{end}}.
    863 
    864 It is an error if {{start}} = {{end}}, unless {{from}} = {{to}}, which is
     860* The ''from''/''to'' arguments give a half-open range containing the characters from index ''from'' up to, but not including, index ''to''.
     861
     862* The ''from''/''to'' indexes are not expressed in the index space of ''textual''. They refer instead to the replicated index space of the subtext defined by ''textual'', ''start'', and ''end''.
     863
     864It is an error if ''start'' = ''end'', unless ''from'' = ''to'', which is
    865865allowed as a special case.
    866866
     
    868868
    869869Returns a list of texts representing the words contained
    870 in the subtext of {{textual}} from {{start}} (inclusive) to {{end}}
    871 (exclusive). The {{delimiter}} is a text or string to be used
     870in the subtext of ''textual'' from ''start'' (inclusive) to ''end''
     871(exclusive). The ''delimiter'' is a text or string to be used
    872872as the word separator. This will often be a single
    873873character, but multiple characters are allowed for use
    874874cases such as splitting on {{"\r\n"}}. The returned list will
    875875have one more item than the number of non-overlapping
    876 occurrences of the delimiter in the text. If {{delimiter}} is
     876occurrences of the delimiter in the text. If ''delimiter'' is
    877877an empty text, then the returned list contains a list of
    878878texts, each of which contains a single character.
    879879
    880 The {{grammar}} is a symbol with the same meaning as in the
    881 {{textual-join}} procedure. If it is {{infix}}, which is the
     880The ''grammar'' is a symbol with the same meaning as in the
     881{{textual-join}} procedure. If it is ''infix'', which is the
    882882default, processing is done as described above, except an
    883 empty {{textual}} produces the empty list; if {{grammar}} is
    884 {{strict-infix}}, then an empty {{textual}} signals an error. The
    885 values {{prefix}} and {{suffix}} cause a leading/trailing empty
     883empty ''textual'' produces the empty list; if ''grammar'' is
     884''strict-infix'', then an empty ''textual'' signals an error. The
     885values ''prefix'' and ''suffix'' cause a leading/trailing empty
    886886text in the result to be suppressed.
    887887
    888 If {{limit}} is a non-negative exact integer, at most that
    889 many splits occur, and the remainder of {{textual}} is
     888If ''limit'' is a non-negative exact integer, at most that
     889many splits occur, and the remainder of ''textual'' is
    890890returned as the final element of the list (so the result
    891 will have at most {{limit+1}} elements). If {{limit}} is not
     891will have at most ''limit''+1 elements). If ''limit'' is not
    892892specified or is {{#f}}, then as many splits as possible are
    893 made. It is an error if {{limit}} is any other value.
    894 
    895 To split on a regular expression {{re}}, use SRFI 115's
     893made. It is an error if ''limit'' is any other value.
     894
     895To split on a regular expression ''re'', use SRFI 115's
    896896{{regexp-split}} procedure:
    897897
     
    917917=== Version History
    918918
    919 ; 0.1 (2020-11-12) : Initial release.
     919; 0.1 : (2020-11-12) Initial release.
    920920
    921921== License
Note: See TracChangeset for help on using the changeset viewer.