Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Switch a few places to use .^parameterize.
  • Loading branch information
jnthn committed Mar 12, 2015
1 parent 976eeaf commit b7dc805
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/core/Any.pm
Expand Up @@ -151,15 +151,15 @@ my class Any { # declared in BOOTSTRAP

proto method classify(|) { * }
multi method classify($test) {
Hash.PARAMETERIZE_TYPE(Any,Any).new.classify-list( $test, self.list );
Hash.^parameterize(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) {
Hash.PARAMETERIZE_TYPE(Any,Any).new.categorize-list( $test, self.list );
Hash.^parameterize(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 @@ -740,13 +740,13 @@ proto sub end(|) { * }
multi sub end($a) { $a.end }

proto sub classify(|) { * }
multi sub classify( $test, *@items ) { Hash.PARAMETERIZE_TYPE(Any,Any).new.classify-list( $test, @items ) }
multi sub classify( $test, *@items ) { Hash.^parameterize(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 ) { Hash.PARAMETERIZE_TYPE(Any,Any).new.categorize-list( $test, @items ) }
multi sub categorize( $test, *@items ) { Hash.^parameterize(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
2 changes: 1 addition & 1 deletion src/core/Hash.pm
Expand Up @@ -447,6 +447,6 @@ sub circumfix:<{ }>(*@elems) { my $ = Hash.new(@elems) }
sub hash(*@a, *%h) { my % = @a, %h }

# XXX parse hangs with ordinary sub declaration
BEGIN my &circumfix:<:{ }> = sub (*@elems) { my $ = Hash.PARAMETERIZE_TYPE(Any,Any).new(@elems) }
BEGIN my &circumfix:<:{ }> = sub (*@elems) { my $ = Hash.^parameterize(Any,Any).new(@elems) }

# vim: ft=perl6 expandtab sw=4

0 comments on commit b7dc805

Please sign in to comment.