Function features
- Definition
- Language structures related to functions

Features
First-Class Functions (JavaScript
, Python
, Haskell
, Scala
, Swift
) Functions are treated like values that can be passed, returned, or assigned.
Closures (JavaScript
, Python
, Rust
, Swift
) Functions that capture and use variables from their defining scope.
Higher-Order Functions (Haskell
, Scala
, JavaScript
, Python
) Functions that take other functions as parameters or return them.
Currying (Haskell
, Scala
, JavaScript
) Transforming a function of multiple arguments into a sequence of unary functions.
Partial Application (Haskell
, Scala
, Python
) Pre-filling some function arguments to create specialized functions.
Default Arguments (Python
, C++
, JavaScript
, Kotlin
) Function parameters that take a default value if not provided.
Variadic Functions (C
, C++
, Python
, JavaScript
) Functions that accept a variable number of arguments.
Tail Recursion (Scheme
, Haskell
, Scala
, Elixir
) Optimization technique for recursive functions that reuse stack frames.
Anonymous Functions / Lambdas (Python
, JavaScript
, C++
, Java
, Swift
) Functions without a name, often used for short operations.