Higher-Order Functions Everywhere: Haskell, Lisp, Python, and C++

Jacob Schrum
Jacob Schrum
2.3 هزار بار بازدید - 4 سال پیش - Functional Programming languages treat functions
Functional Programming languages treat functions as first-class citizens, meaning that functions can be passed as parameters to other functions, and also returned as results from other functions. Functions that accept or return functional values are higher-order functions. This video demonstrates the common higher-order functions of map and fold/reduce, and uses them to provide short, elegant definitions for rounding all numbers in a list of floating point values, calculating a sum, and even doing insertion sort. The most focus is given to the languages Haskell and Common Lisp, but this video also demonstrates the existence of map and reduce in Python, and even shows how C++ functions can have functional parameters with the use of pointers.
4 سال پیش در تاریخ 1399/05/16 منتشر شده است.
2,391 بـار بازدید شده
... بیشتر