Please use a match/select and a list comprehension instead.