LAMBDA Recursion

Mar 14, 2024 3:47 PM
Mar 14, 2024 3:47 PM

LAMBDA Recursion is a technique that uses a LAMBDA term that calls itself in order to perform recursion.

Syntax

LET(func, LAMBDA(func, <variables>, <expression>), func(func, <variables>))
LAMBDA(func, func(func, <variables>))(LAMBDA(func, <variables>, <expression>))

Either syntax is valid; however, LET is typically easier to work with and read.