I know that I can use map with a function of one variable in the following manner:
map
var squarefunc = function(x) { return x*x; }; values = [1