Questions tagged [lambda]

For questions about lambda functions, anonymous functions that can be defined inline and used for concise and functional programming approaches.

Filter by
Sorted by
Tagged with
7 votes
7 answers
2k views

Is there a generic way to refer to the current function in recursion?

In writing recursive functions (functional style), I often need to refer to the current function (depending on the context). e.g. f 0 = 0 f (S n) = f n + 2 Are ...
tinlyx's user avatar
  • 407
5 votes
1 answer
162 views

Possible ways to determine reach of implicit lambda expressions

When defining an inline function, even the shortest way to do so usually requires naming its argument (unless you're going for the point-free style and you have an expression that returns a function). ...
Lazar Ljubenović's user avatar
6 votes
4 answers
320 views

How can multiline lambdas be designed in indent based languages?

How can multiline lambdas be designed in indent based languages? In Go, language with curly brackets, I will write multiline lambdas like this: ...
nchistov's user avatar
  • 1,585
11 votes
14 answers
553 views

What are common options for lambda function syntax?

A lot of languages have anonymous functions, also known as lambda functions. Anonymous, in-line, functions that can be used inside expressions for things like mapping and filtering. What are common ...
Ginger's user avatar
  • 2,579