higher order function, first class function

tags: learning programming

content

What is higher order function?

  • a function that either:
    • takes in other function(s) as arguments
    • returns another functions

What is first class function?

  • functions that are treated as other entities in the programming language
  • first class functions can be:
    • assigned to variables
    • passed to other functions as arguments, or being returned by other functions
    • created during runtime
    • stored in other data structure like maps and arrays

up

down

reference