Eirik Berg Hanssen <Eirik-Berg.Hanssen <at> allverden.no> writes: >If your C<eqv> is merely C<eq>, you'll have to accept that stuff that overloads >C<eq>, like junctions, have their own idea of list membership. Good point. I was assuming that there is a concept of scalar equality defined by the language and accessible to the programmer directly. But this is not the case, it seems; you cannot use 'eq' to reliably compare two scalars for equality, since C<'a' eq any('a')> even though 'a' and 'Perl6::Junction::Any=ARRAY(0x2488048)' are manifestly different things. If there is not a reliable equality operator then it makes no sense to ask for a list membership operator. So perhaps C<$x eq any(@a)> is the best we are going to get, even though as mentioned it does not reliably test list membership. -- Ed Avis <eda@waniasset.com>Thread Previous | Thread Next