Map a function over a list
Applies a function to each element of a list and returns a new list of results.
list (List): The input
list.
fn (Function): The function to
apply to each element.
The list of results.
map([1, 2, 3], fn(x) -> x * 2)
-- Returns = [2, 4, 6]