A given/when construct using a junction isn't quite doing what I'd expect.
I'd thought that that would confirm that both elements were Int:
say do given all(3,7) { when Int { "both are Int" }; default {"not
similar"} };
## not similar
But this does what I thought it would:
say so do all(3
> I'd thought that that would confirm that both elements were Int:
say do given all(3,7) { when Int { "both are Int" }; default {"not similar"}
};
## not similar
I get a different result
$ raku -e ' say do given all(3,7) { when Int { "both are Int" }; default
{"not similar"} };'
both are I
That's interesting. I just re-built from github and I'm still
seeing the behavior I reported:
raku -e 'say do given all(3,7) { when Int { "both are Int" };
default {"not similar"} };'
not similar
That's with:
raku --version
Welcome to Rakudo™ v2021.10-43-ga8329f6fd.
Implementing the R
Joseph Brenner wrote:
> Andy Bach wrote:
>> Joseph Brenner wrote:
>>> I'd thought that that [this] would confirm that both elements were Int:
>>> say do given all(3,7) { when Int { "both are Int" }; default {"not
>>> similar"} };
>>> ## not similar
>> I get a different result
>> $ raku