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

Quiz — Junctions

What does the following program print?

say so 4 == all(2, 4, 6);
0True
1False
0all(2, 4, 6)
04

An all junction is true only when every value matches. The test 4 == all(2, 4, 6) asks whether 4 equals 2 and 4 and 6 — which it does not, so the result is False.

Course navigation

Building junctions   |   Autothreading