Skip to content

Commit

Permalink
Mark set()/bag()/mix() as pure
Browse files Browse the repository at this point in the history
So that set/bag/mix with literal values can be created once at compile
time, instead of at runtime.
  • Loading branch information
lizmat committed Jun 29, 2018
1 parent 84f60ad commit c37c3b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/set_operators.pm6
@@ -1,12 +1,12 @@
proto sub set(|) {*}
proto sub set(|) is pure {*}
multi sub set() { BEGIN nqp::create(Set) }
multi sub set(*@a --> Set:D) { Set.new(@a) }

proto sub bag(|) {*}
proto sub bag(|) is pure {*}
multi sub bag() { BEGIN nqp::create(Bag) }
multi sub bag(*@a --> Bag:D) { Bag.new(@a) }

proto sub mix(|) {*}
proto sub mix(|) is pure {*}
multi sub mix() { BEGIN nqp::create(Mix) }
multi sub mix(*@a --> Mix:D) { Mix.new(@a) }

Expand Down

0 comments on commit c37c3b5

Please sign in to comment.