code: function map(f) {
    return function(xs) {
      var output = [];
      for (var idx = 0; idx < xs.length; idx += 1) {
        output.push (f (xs[idx]));
      }
      return output;
    };
  }
docs: # map :: (a -> b) -> Array a -> Array b . . Transforms a list of elements of type `a` into a list of elements . of type `b` using the provided function of type `a -> b`. . . ```javascript . > map (String) ([1, 2, 3, 4, 5]) . ['1', '2', '3', '4', '5'] . ```