Skip to content

Commit

Permalink
use object hashes for .classify and .categorize
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Jan 18, 2015
1 parent e37eb06 commit 285435e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/Any.pm
Expand Up @@ -105,15 +105,15 @@ my class Any { # declared in BOOTSTRAP

proto method classify(|) { * }
multi method classify($test) {
{}.classify-list( $test, self.list );
Hash.PARAMETERIZE_TYPE(Any,Any).new.classify-list( $test, self.list );
}
multi method classify($test, :$into!) {
( $into // $into.new ).classify-list( $test, self.list );
}

proto method categorize(|) { * }
multi method categorize($test) {
{}.categorize-list( $test, self.list );
Hash.PARAMETERIZE_TYPE(Any,Any).new.categorize-list( $test, self.list );
}
multi method categorize($test, :$into!) {
( $into // $into.new ).categorize-list( $test, self.list );
Expand Down Expand Up @@ -669,13 +669,13 @@ proto sub end(|) { * }
multi sub end($a) { $a.end }

proto sub classify(|) { * }
multi sub classify( $test, *@items ) { {}.classify-list( $test, @items ) }
multi sub classify( $test, *@items ) { Hash.PARAMETERIZE_TYPE(Any,Any).new.classify-list( $test, @items ) }
#multi sub classify( $test, *@items, :$into! ) { # problem in MMD
# ( $into // $into.new).classify-list( $test, @items );
#}

proto sub categorize(|) { * }
multi sub categorize( $test, *@items ) { {}.categorize-list( $test, @items ) }
multi sub categorize( $test, *@items ) { Hash.PARAMETERIZE_TYPE(Any,Any).new.categorize-list( $test, @items ) }
#multi sub categorize( $test, *@items, :$into! ) { # problem in MMD
# ( $into // $into.new).categorize-list( $test, @items );
#}
Expand Down

0 comments on commit 285435e

Please sign in to comment.