Use list comprehension instead of lists:map/2.