PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

First-Class Functions

First-Class Functions

First-Class Functions are a feature.

In computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures.


Languages with First-Class Functions include JavaScript, Hack

Example from JavaScript:
[2.0,1.1].map(Math.round)
duck-typing-feature.html 路 first-class-functions-feature.html 路 fixed-point-feature.html

View source

PLDB - Build the next great programming language 路 v2022 Day 29 Docs Build Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com