Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Be more smart about singel arging bag/set/mix()
FROGGS++ for inspiration
  • Loading branch information
lizmat committed Aug 28, 2015
1 parent 18261c9 commit 1a05c67
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/core/set_operators.pm
Expand Up @@ -312,16 +312,8 @@ only sub infix:<≽>($a, $b --> Bool) {
$a (>+) $b;
}

proto sub set(|) { * }
multi sub set(\value --> Set) { Set.new(value) }
multi sub set(**@args --> Set) { Set.new(@args) }

proto sub bag(|) { * }
multi sub bag(\value --> Bag) { Bag.new(value) }
multi sub bag(**@args --> Bag) { Bag.new(@args) }

proto sub mix(|) { * }
multi sub mix(\value --> Mix) { Mix.new(value) }
multi sub mix(**@args --> Mix) { Mix.new(@args) }
sub set(|c --> Set) { Set.new(|c) }
sub bag(|c --> Bag) { Bag.new(|c) }
sub mix(|c --> Mix) { Mix.new(|c) }

# vim: ft=perl6 expandtab sw=4

0 comments on commit 1a05c67

Please sign in to comment.