Topic 7 Anonymous Functions

Lambda Calculus in a Nutshell

Figure 7.1: Lambda Calculus in a Nutshell

You’ve learned about functions in Python - blocks of organized, reusable code that do something. You also know that in Python, we use the keyword def to define a function like so:

def makeMatrix(nrow, ncol):
  return [(['o'] * ncol) for i in range(nrow)]

However, I think another variant of functions - an anonymous funciton - may be worth considering during the final projects or even during the CAs!