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;| 0 | 12 |
| 0 | 6 |
| 1 | any(2, 4, 6) |
| 0 | any(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 →