I played with the "is" trait and I is puzzled. This example code
multi trait_mod: (Routine \routine, :$equality!) {
trait_mod:(routine, :equiv(:<==>));
}
sub is-eq is equality { ... }
say 'is-eq ',
multi trait_mod: (Routine \routine, :$chainable!) {
trait_mod:(routine, :assoc);
}
On Wed, Aug 12, 2020 at 8:12 AM Tobias Boege wrote:
> [...]
> > Would a custom version of the trait_mod: routine do the trick?
>
> Yes:
>
> multi trait_mod: (Routine $r, :$equivalence!) {
> trait_mod:($r, :equiv(:<==>));
> trait_mod:($r, :assoc);
> }
As a supplementary question:
On Wed, Aug 12, 2020 at 12:12:34AM +0200, Tobias Boege wrote:
: I have no idea if this attribute or the format
: for the 'prec' key in particular are standardized.
The whole point of providing equiv/tighter/looser was to avoid
standardizing absolute precedence levels. That being said, I
don't
On Wed, Aug 12, 2020 at 8:12 AM Tobias Boege wrote:
> > I'm working with roles where the mixing-in classes and roles need to
> > have some mixin-specific notion of equality. So I have an Equality
> > role that can also be
> > mixed in as needed:
> >
> > role Equality {
> > method
On Wed, 12 Aug 2020, Stuart Hungerford wrote:
> Hi,
>
> I'm working with roles where the mixing-in classes and roles need to
> have some mixin-specific notion of equality. So I have an Equality
> role that can also be
> mixed in as needed:
>
> role Equality {
> method equal(Equality:D) of
Hi,
I'm working with roles where the mixing-in classes and roles need to
have some mixin-specific notion of equality. So I have an Equality
role that can also be
mixed in as needed:
role Equality {
method equal(Equality:D) of Bool:D {...}
}
To make using the role easier I've created an infix