Functions & Functional Programming

Functions are the heart of Aegis logic. They are first-class citizens, meaning they can be assigned to variables, passed as arguments, and returned from other functions.

Aegis v0.2 heavily emphasizes Functional Programming paradigms alongside imperative code.

This chapter covers:

  • Declarations: Standard named functions.
  • Lambdas: Anonymous functions and closures.
  • Decorators: Modifying function behavior dynamically.
  • Functional Tools: Processing data with map, filter, and for_each.