Implemented Étude 7-3: Using lists:foldl/3