Set::Equality - Implement (==) for older Raku versions
say (1,2,3) (==) (3,1,2); # True
Set::Equality module implements the
(==) operator (and its unicode version
≡, and its counterpart
≢) for versions of Raku before the 2020.06 Rakudo compiler release. Its implementation and tests are identical to the ones from Rakudo 2020.06 and later.
On versions of Rakudo that already implement the
(==) operator and its friends, loading this module is basically a no-op.
(==) operator conceptually coerces its parameters to
Sets for non-
QuantHash types. So:
(1,2,3) (==) (3,1,2)
is conceptually the same as:
(1,2,3).Set eqv (3,1,2).Set
It will however actually do as little actual coercion as possible to provide the
False it is to return. For example:
<foo bar baz> (==) %hash
True if there are 3 keys in the hash, and they are
baz, and each of these keys holds a truthy value.
Elizabeth Mattijsen email@example.com
Source can be located at: https://github.com/lizmat/Set-Equality . Comments and Pull Requests are welcome.
COPYRIGHT AND LICENSE
Copyright 2020, 2021 Elizabeth Mattijsen
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.