Course of Raku / Advanced / Subroutines / Calling with a colon 🆕 / Exercises

Join with a colon

Problem

The colon form must be the last call in a chain, but the calls before it can be ordinary parenthesised ones. Start from the words a, b, c, reverse them with .reverse, and then join the result with a dash using the colon form. Print it.

Example

The program prints:

c-b-a

Solution

See the solution

Course navigation

Solution: A colon map   |   Solution: Join with a colon