Working with Functions in Scala – Part 2

In this part, we take functions a little further and discuss the following:

  1. Working with Lists of Functions
  2. Generated Functions

This builds a bit on the previous post on Functions in Scala, so if you haven’t seen it already, I’d highly suggest you take a look here: Working with Functions in Scala – Part 1

Continue reading


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