Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove (grep|first|last)-index fossil
  • Loading branch information
lizmat committed Oct 17, 2015
1 parent e6fcddd commit 4218c13
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
6 changes: 0 additions & 6 deletions S29-functions.pod
Expand Up @@ -678,20 +678,14 @@ These functions are exported into the default namespace

=item grep -- see S32-setting-library/Containers.pod

=item grep-index -- see S32-setting-library/Containers.pod

=item first -- see S32-setting-library/Containers.pod

=item first-index -- see S32-setting-library/Containers.pod

=item join -- see S32-setting-library/Containers.pod

=item keys -- see S32-setting-library/Containers.pod

=item kv -- see S32-setting-library/Containers.pod

=item last-index -- see S32-setting-library/Containers.pod

=item map -- see S32-setting-library/Containers.pod

=item max -- see S32-setting-library/Containers.pod
Expand Down
35 changes: 0 additions & 35 deletions S32-setting-library/Containers.pod
Expand Up @@ -249,14 +249,6 @@ an argument will iterate or terminate the C<grep> itself, not some
loop surrounding the statement containing the C<grep>. Use a label
if you mean the other thing.

=item grep-index

multi method grep-index ( @values: Matcher $test --> Iterable )
multi grep-index ( Matcher $test, *@values --> Iterable )

Like C<grep>, but returns ordinal numbers of the matching
values, or C<Nil> if not found.

=item first

multi method first ( @values: Matcher $test )
Expand All @@ -265,33 +257,6 @@ values, or C<Nil> if not found.
C<first> searches exactly like C<grep> but stops testing at the first match
and returns just that value. Returns C<Nil> if no match is found.

=item first-index

multi method first-index ( @values: Matcher $test --> Any )
multi first-index ( Matcher $test, *@values --> Any )

Like C<first>, but returns the ordinal number of the first matching value,
or C<Nil> if not found.

=item last-index

multi method last-index ( @values: Matcher $test )
multi last-index ( Matcher $test, *@values )

C<.last-index> is similar to C<first-index>, but the values are tested
starting with the last value and working backwards until the first
successful test. The returned indices are still as counted from the
beginning of the sequence.

Lazy sequences will be iterated to the end, remembering values, before
any tests are evaluated. If the test is not as resource intensive as
remembering all the values, consider instead:

@values.grep-index($test).max;

...which will run the test on all elements but will not keep unneeded
values in memory.

=item pick

multi method pick ( -> Mu )
Expand Down

0 comments on commit 4218c13

Please sign in to comment.