Comment Comment by Saavedro map takes a function and returns a function that takes a list and returns a list. It has a type like: (a->b) -> [a] -> [b] (I take a function from type a to type b and return a function from list of a to list of b)definedouble_list_elements = map (*2)and> double_list_elements [1, 2, 3, 4]gives you [2, 4, 6, 8] parent Saavedro 11 years ago
define
double_list_elements = map (*2)
and
> double_list_elements [1, 2, 3, 4]
gives you [2, 4, 6, 8]