Given the following function definitions:

var map = function (f,ns) {
              if (fp.isNull(ns)) {
                 return ns;
              } else {
                 return fp.cons(f(fp.hd(ns)),map(f,fp.tl(ns)));
              }
};
var h = function (x) { return x % 3 === 0; };

what is the value of the following function call?

  map ( function (x) { return h( fp.hd(x) ); }, 
        [ [3,2], [4,5], [6,7], [8,9] ] )
[ true, false, true, false ]
  • [ 3, 4, 6, 8 ]
  • [ true ]
  • [ 2, 5, 7, 9 ]
  • error

What does the function h return?

What does the anonymous function return?

What does the function map return?