Skip to content

Commit

Permalink
Make sub infix:«=>» a multi
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Mar 1, 2018
1 parent a23684f commit 804c009
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/Pair.pm
Expand Up @@ -132,9 +132,8 @@ multi sub infix:<cmp>(Pair:D \a, Pair:D \b) {
(a.key cmp b.key) || (a.value cmp b.value)
}

sub infix=>»(Mu $key, Mu \value) is pure {
Pair.new($key, value)
}
proto sub infix=>»(|) is pure {*}
multi sub infix=>»(Mu $key, Mu \value) { Pair.new($key, value) }

proto sub pair(|) is pure {*}
multi sub pair(Mu $key, \value) { Pair.new($key, value) }
Expand Down

0 comments on commit 804c009

Please sign in to comment.