Course of Raku / Functional, concurrent, reactive, and web programming / Functional programming / Reduction / Exercises

Join the strings

Problem

Using the reduce metaoperator with the string-concatenation operator ~, glue the single-character strings '2', '0', '2', '5' into one string and print it.

Example

The program prints:

2025

Solution

See the solution

Course navigation

Solution: Product of a list   |   Solution: Join the strings