理解first-order vs. higher-order function

  • Overview

    In Python, decorators provide a simple syntax for calling higher-order functions.

  • Higher-order function

    A higher-order function is a function that does at least one of the following:

    1. takes one or more functions as arguments (procedural parameters)
    2. returns a function as its result
  • procedural parameter

    In computing, a procedural paramter is a parameter of a procedure that itself a procedure.

  • First-order function

    All other functions are first-order functions.

  • Summary

    In mathematics higer-order functions are also termed operators or functionals.

  • operator

    An operator is generally a mapping or function that acts on elements of a space to produce elements of another space.

你可能感兴趣的:(#,first-order,higher-order)