Skip to content

Commit

Permalink
remove filter_no_if, as it doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakim Cassimally committed Jun 21, 2011
1 parent e515e4f commit 44cf16e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions code/perl/moose/lib/List.pm
Expand Up @@ -107,6 +107,11 @@ role List {
}
}

=begin doesnt' work
# at that time, $self is still MooseX::Method::Signatures::Meta::Method
# rather than the $self in the signature
multi method filter_no_if (List::Empty $self: CodeRef $f) {
return $self;
}
Expand All @@ -120,6 +125,9 @@ role List {
tail_call $self->tail->filter( $f );
}
=end
=cut

multi method foldl (List::Empty $self: CodeRef $f, $acc) {
return $acc;
}
Expand Down
1 change: 0 additions & 1 deletion code/perl/moose/t/chapter_01/01_list.t
Expand Up @@ -52,7 +52,6 @@ is $names->nth(0), 'Bob Smith', 'map ok';
is $names->nth(1), 'Aisha Chaudhury', 'map ok';

my $filtered = $list->filter( sub { (shift) % 2 });

is $filtered->head, 11, 'odd filter';
is $filtered->nth(1), 13, 'odd filter';

Expand Down

0 comments on commit 44cf16e

Please sign in to comment.