Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
simplify listop map dispatch to a single one-arg
  • Loading branch information
TimToady committed Sep 19, 2015
1 parent a98ce40 commit d9c21e9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/Any-iterable-methods.pm
Expand Up @@ -729,11 +729,7 @@ multi sub infix:<minmax>(+args) { args.minmax }
sub minmax(+args, :&by = &infix:<cmp>) { args.minmax(&by) }

proto sub map(|) {*}
# fails integration/99problems-21-to-30, test 12/13
#multi sub map(&code, @values) { @values.map(&code) }
multi sub map(&code, *@values is raw) { @values.map(&code) }
multi sub map(Whatever, \a) { a }
multi sub map(&code, Whatever) { (1..Inf).map(&code) }
multi sub map(&code, +values) { values.map(&code) }

proto sub grep(|) {*}
multi sub grep(Mu $test, +values) { values.grep($test) }
Expand Down

0 comments on commit d9c21e9

Please sign in to comment.