Course of Raku / Functional, concurrent, reactive, and web programming / Functional programming / Lazy and infinite sequences / The sequence operator

Quiz — The sequence operator

What does the following program print?

say (3, 6 ... 15);
0(3 6)
0(3 6 15)
1(3 6 9 12 15)
0(3 6 9 12 15 18)

From 3, 6 the operator infers a step of +3 and continues until it reaches the endpoint 15: 3, 6, 9, 12, 15.

Course navigation

The sequence operator   |   Infinite sequences