Skip to content

Commit

Permalink
Merge pull request #1317 from MasterDuke17/add_some_special_cases_for…
Browse files Browse the repository at this point in the history
…_infix_comma

Add two special cases for infix:<,>
  • Loading branch information
zoffixznet committed Mar 10, 2018
2 parents 65874b1 + b6e5d7f commit 2a39478
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/List.pm6
Expand Up @@ -1492,6 +1492,12 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
# The , operator produces a List.
proto sub infix:<,>(|) is pure {*}
multi sub infix:<,>() { nqp::create(List) }
multi sub infix:<,>(Int \a, Int \b) is default {
nqp::p6bindattrinvres(nqp::create(List),List,'$!reified',nqp::list(a,b))
}
multi sub infix:<,>(Str \a, Str \b) {
nqp::p6bindattrinvres(nqp::create(List),List,'$!reified',nqp::list(a,b))
}
multi sub infix:<,>(|) {

# look for a Slip in the parameters
Expand Down

0 comments on commit 2a39478

Please sign in to comment.