1 USING: help sequences ;
4 { $class-description "A virtual sequence which presents a reversed view of an underlying sequence." }
5 { $see-also <reversed> reverse } ;
8 { $values { "m" "a non-negative integer" } { "reversed" "an instance of " { $link reversed } } { "n" "a non-negative integer" } { "seq" "a sequence" } }
9 { $description "Indexes into a reversed sequence. Helper word used to implement " { $link "sequence-protocol" } " methods for the " { $link reversed } " class." } ;
12 { $values { "seq" "a sequence" } { "newseq" "a new sequence" } }
13 { $description "Outputs a new sequence having the same elements as " { $snippet "seq" } " but in reverse order." } ;
15 HELP: <reversed> ( seq -- reversed )
16 { $values { "seq" "a sequence" } { "reversed" "a new sequence" } }
17 { $description "Creates an instance of the " { $link reversed } " virtual sequence." } ;
20 { $values { "str" "a reason" } }
21 { $description "Throws a " { $link slice-error } "." }
22 { $error-description "Thrown by " { $link <slice> } " if one of the following invalid conditions holds:"
24 "The start index is negative"
25 "The end index is greater than the length of the sequence"
26 "The start index is greater than the end index"
31 { $class-description "A virtual sequence which presents a subrange of the elements of an underlying sequence." }
32 { $see-also <slice> subseq } ;
35 { $values { "m" "a non-negative integer" } { "n" "a non-negative integer" } { "seq" "a sequence" } { "slice" "a slice" } }
36 { $description "Outputs a new virtual sequence sharing storage with the subrange of elements in " { $snippet "seq" } " with indices starting from and including " { $snippet "m" } ", and up to but not including " { $snippet "n" } "." }
37 { $errors "Throws an error if " { $snippet "m" } " or " { $snippet "n" } " is out of bounds." } ;
40 { $values { "m" "a non-negative integer" } { "slice" "an instance of " { $link slice } } { "n" "a non-negative integer" } { "seq" "a sequence" } }
41 { $description "Indexes into a slice. Helper word used to implement " { $link "sequence-protocol" } " methods for the " { $link reversed } " class." } ;
44 { $class-description "A virtual sequence which presents a fixed column of a matrix represented as a sequence of rows." }
45 { $see-also <column> } ;
48 { $values { "seq" "a sequence" } { "n" "a non-negative integer" } }
49 { $description "Outputs a new virtual sequence which presents a fixed column of a matrix represented as a sequence of rows." "The " { $snippet "i" } "th element of a column is the " { $snippet "n" } "th element of the " { $snippet "i" } "th element of" { $snippet "seq" } ". Every element of " { $snippet "seq" } " must be a sequence, and all sequences must have equal length." }
52 "{ { 1 2 3 } { 4 5 6 } { 7 8 9 } } 0 <column> >array ."
57 "In the same sense that " { $link <reversed> } " is a virtual variant of " { $link reverse } ", " { $link <column> } " is a virtual variant of " { $snippet "[ swap nth ] map-with" } "."
61 { $values { "m" "a non-negative integer" } { "column" "an instance of " { $link column } } { "n" "a non-negative integer" } { "seq" "a sequence" } }
62 { $description "Indexes into a column view of a matrix. Helper word used to implement " { $link "sequence-protocol" } " methods for the " { $link column } " class." } ;