jargon

Design patterns·Functional ideas that went mainstream

you put the function in a variable, passed it to something and returned it from somewhere else, like any other value.

First-class function

Also calledfunctions as values, first class function

A language property: functions can be stored, passed and returned like any other value. It is the feature that collapses several patterns into ordinary code — a strategy becomes a parameter, a command becomes a closure, an observer becomes a list of functions. Saying that in an interview is a stronger answer than reciting the class diagram for any of the three.

Commonly confused with