Created: 2023-09-06 10:27
Status: #concept
Subject: Programming
Tags: Java Function Arrow Function IIFE Expression JavaScript Array Functional Programming

Lambda Expression

They are shorthand Functions that take in an input and return an output and are Pure Functions.

Java

They are typically used in manipulating streams with java.util.Stream methods which return another Stream<E>.

JavaScript / TypeScript

Python

# filter(function, iterable)
list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
list(filter(lambda x: x % 2 == 0, list1))

References