Multiton: Difference between revisions

m
m (→‎{{header|Raku}}: simplify)
m (→‎{{header|Raku}}: simplify)
Line 133:
class Multiton {
 
my %instances = MultitonType.keys Z=> $ ⚛= 1 xx MultitonType.keys.elems* ;
 
has $.type is rw;
 
method TWEAK { self$.type = 'Nothing' unless cas(%instances{self$.type}, 1, 0) }
}
 
350

edits