Call Multiple Lambdas with the Same Input

Learn to call multiple lambdas with the same input.

We'll cover the following

We can easily create multiple instances of a lambda with different capture values by wrapping the lambda in a function. This allows us to call different versions of a lambda with the same input.

How to do it

This is a simple example of a lambda that wraps a value in different types of braces:

  • We’ll start by creating the wrapper function braces():

Get hands-on with 1200+ tech skills courses.