Set::Equality

Implement (==) for older Raku versions

NAME

Set::Equality - Implement (==) for older Raku versions

SYNOPSIS

use Set::Equality;

say (1,2,3) (==) (3,1,2);  # True

DESCRIPTION

The 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.

The (==) operator concepgtually 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 True or False it is to return. For example:

<foo bar baz> (==) %hash

will return True if there are 3 keys in the hash, and they are foo, bar and baz, and each of these keys holds a truthy value.

AUTHOR

Elizabeth Mattijsen [email protected]

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.

Set::Equality v0.0.3

Implement (==) for older Raku versions

Authors

  • Elizabeth Mattijsen

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Set::Equality

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.