Open treyharris opened 4 years ago
I would argue that some of these results are incorrect
@lizmat that, too.
I agree, too. But the operator needs to be documented regardless.
The problem is all the Set operators on Ranges turn them into lists and then put that into a set.
Which works OK for Integers and Strings (ish) but less well for other.
This is why I started Range::SetOps which I really should get round to finishing (it doesn't handle a bunch of edge cases).
https://modules.raku.org/dist/Range::SetOps:cpan:SCIMON
On Tue, 28 Jan 2020 at 20:16, Trey Harris notifications@github.com wrote:
I agree, too. But the operator needs to be documented regardless.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Raku/doc/issues/3189?email_source=notifications&email_token=AAATZ3RVGRQX2TGDE6NCUH3RACHCHA5CNFSM4KMXDFE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKEXWOA#issuecomment-579435320, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATZ3UEJCMRT3YT73BSZPLRACHCHANCNFSM4KMXDFEQ .
-- Simon Proctor Cognoscite aliquid novum cotidie
Actually, (elem)
with Ranges on the right handside is implemented as a thing on its own, see https://github.com/rakudo/rakudo/blob/15df5d8a85406a92a9cbcb994e1d424029007f39/src/core.c/set_elem.pm6#L67
Anyway, the implementation of it is too naive; not necessarily better than a naive Set-coercion would be. Perhaps it should be improved before it can be documented.
The problem
infix:(elem)
and its synonyminfix:<∈>
are not documented forRange
.Current behavior: