Course of Raku / Functional, concurrent, reactive, and web programming / Functional programming / Reduction / Exercises / Product of a list
Solution: Product of a list
Here is a possible solution to the task.
Code
say [*] 1..6;🦋 You can find the source code in the file product-list.raku.
Output
720Comments
[*]inserts*between every element of the range, multiplying them all.1 * 2 * 3 * 4 * 5 * 6is720— the same as the factorial of6.