Working with Functions in Scala – Part 1

Scala treats functions as first class citizens. I keep forgetting the syntax for it, so putting it here as a handy reference. This post deals with the following features of Scala:

  1. Anonymous Functions
  2. Assigning Functions to variables
  3. Composite Functions
    Please note that the term ‘function’ here is used to refer to both mathematical functions and programmatic functions. The key strength of Functional Programming languages is the ability to unify both.

Continue reading