Course of Raku / Functional, concurrent, reactive, and web programming / Concurrent programming / Junctions / Autothreading

Quiz — Autothreading

What does the following program print?

my $j = 1 | 2 | 3;
say $j * 2;
012
06
1any(2, 4, 6)
0any(1, 2, 3)

Multiplying a junction autothreads: * 2 is applied to each value behind the junction, producing a new any junction any(2, 4, 6).

Course navigation

Autothreading   |   Exactly one