News for hackers. Stuff that matters.
Re:Why Would Anyone Use Perl 6? by grondilu on Wednesday January 13, 2016 @10:19AM (#10894897)
By set operations I was more specifically thinking of intersection and union. Testing if an element belongs to a set can indeed be done with junctions but that's pretty much it.

The third example shows the so-called auto-threading behavior. I think it's significantly different than what you can do with sets.

A Junction in Perl 6 is "a superposition of data values pretending to be a single value". So for instance any algebraic expression can be used with a junction as if it was a scalar. The result will be a junction.

In this example the expression is $_ %% 2, which is Perl 6's way of writing the boolean statement "the variable $_ is divisible by 2". We use this expression with ($a & $b) instead of $_.

There are no comments on this comment yet.