Skip to content
This repository
Browse code

Remove obsolete (I hope!) to-set coercion multis.

  • Loading branch information...
commit 3e65d845764eff7165fe58e1017743559c2d2bee 1 parent 480a062
colomon colomon authored

Showing 1 changed file with 0 additions and 12 deletions. Show diff stats Hide diff stats

  1. +0 12 lib/CORE.setting
12 lib/CORE.setting
@@ -2207,18 +2207,6 @@ class Set does Associative {
2207 2207
2208 2208 method ACCEPTS($other) { defined(self) ?? $other ⊆ self && self ⊆ $other !! $other.^does(self) }
2209 2209
2210   - # Coercions to and from
2211   - method postcircumfix:<( )> ($s --> Set) { to-set($s) }
2212   - multi to-set (Set $set --> Set) { $set }
2213   - multi to-set (KeySet $set --> Set) { Set.new: $set }
2214   - multi to-set (Bag $bag --> Set) { Set.new: $bag }
2215   - multi to-set (KeyBag $bag --> Set) { Set.new: $bag }
2216   - multi to-set (Hash $elems --> Set) { Set.new: $elems.keys }
2217   - multi to-set (@elems --> Set) { Set.new: @elems }
2218   - multi to-set ([*@elems] --> Set) { Set.new: @elems }
2219   - multi to-set (%elems --> Set) { Set.new: %elems.keys }
2220   - multi to-set ($elem --> Set) { die "Cannot coerce $elem.perl() to a Set; use set($elem.perl()) to create a one-element set" }
2221   -
2222 2210 method Str() { self.defined ?? %!elems.keys().join(" ") !! nextsame }
2223 2211 method gist() { self.defined ?? "set({ %!elems.keys».gist.join(', ') })" !! "(Set)" }
2224 2212 method perl() { self.defined ?? 'Set.new(' ~ join(', ', map { .perl }, %!elems.keys) ~ ')' !! "Set" }

0 comments on commit 3e65d84

Please sign in to comment.
Something went wrong with that request. Please try again.