Skip to content

Commit

Permalink
Revert "List: add example to classify to split a list based on condit…
Browse files Browse the repository at this point in the history
…ion"

This reverts commit 531e97f.

The proposed solution doesn't work if one result array would be empty.
  • Loading branch information
rudis committed Mar 1, 2016
1 parent f6bb663 commit e9056d0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions doc/Type/List.pod
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,6 @@ Example:
say ('hello', 1, 22/7, 42, 'world').classify: { .Str.chars };
#-> 1 => 1, 2 => 42, 5 => hello world, 8 => 3.142857
C<classify> can also be used to partition a list into two lists by using a
predicate. The first list contains all items matching the predicate, the
second the rest (note the usage of C<:=>):
my (@even, @odd) := (1, 7, 6, 3, 2).classify({ $_ %% 2 }).{True, False};
say @even; # 6 2
say @odd; # 1 7 3
=head2 method Bool
Defined as:
Expand Down

0 comments on commit e9056d0

Please sign in to comment.