Example 4: Functional programming, hoe to work with lists