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

Gather with a condition

Problem

Using gather and take, collect the vowels from the word 'education'. Split the word into characters with .comb, and take each character that is a vowel (a, e, i, o, or u). Print the list.

Example

The program prints:

[e u a i o]

Solution

See the solution

Course navigation

Solution: Gather the multiples of three   |   Solution: Gather with a condition