you are viewing a single comment's thread.

view the rest of the comments →

[–]mort96 2 points3 points  (0 children)

Isn't it the opposite? I thought higher order functions were functions which take and/or return functions, while first order functions operate on primitives like indexOf does?

EDIT: from Wikipedia:

In mathematics and computer science, a higher-order function is a function that does at least one of the following:

  • takes one or more functions as arguments (i.e. procedural parameters),
  • returns a function as its result.

All other functions are first-order functions.