Course of Raku / Addendum 🆕 / Flow and functions / Subroutines and functional style / Exercises

Sum of even squares

Problem

In a single pipeline, take the numbers 1 to 10, keep the even ones, square them, and add up the results. Print the total.

Example

The program prints:

220

Solution

See the solution

Course navigation

Solution: A running accumulator   |   Solution: Sum of even squares