@@ -125,15 +125,16 @@ Defined As:
125
125
multi method skip(Int() $n = 1 --> Seq)
126
126
127
127
Returns a Seq containing whatever is left of the invocant after
128
- throwing away C < $n > of the next available values. May (and
129
- probably will) return the invocant itself. Negative values of
130
- C < $n > count as 0 . Will block on lazy Seqs until the requested
128
+ throwing away C < $n > of the next available values. Negative values of
129
+ C < $n > count as 0. Also can take a WhateverCode to indicate how many values
130
+ to skip from the end . Will block on lazy Seqs until the requested
131
131
number of values have been discarded.
132
132
133
- say (1..5).map({$_}).skip; # OUTPUT: «(2,3,4,5)»
134
- say (1..5).map({$_}).skip(3); # OUTPUT: «(4,5)»
135
- say (1..5).map({$_}).skip(5); # OUTPUT: «()»
136
- say (1..5).map({$_}).skip(-1); # OUTPUT: «(1,2,3,4,5)»
133
+ say (1..5).map({$_}).skip; # OUTPUT: «(2,3,4,5)»
134
+ say (1..5).map({$_}).skip(3); # OUTPUT: «(4,5)»
135
+ say (1..5).map({$_}).skip(5); # OUTPUT: «()»
136
+ say (1..5).map({$_}).skip(-1); # OUTPUT: «(1,2,3,4,5)»
137
+ say (1..5).map({$_}).skip(*-3); # OUTPUT: «(3,4,5)»
137
138
138
139
= end pod
139
140
0 commit comments