Remix.run Logo
keyle 4 days ago

C#, Swift, Dart, Rust... Python. Many languages take lambda/predicate/closure as filter/where.

It generally unrolls as a `for loop` underneath, or in this case LINQ/SQL.

C# was innovative for doing it first in the scope of SQL. I remember the arrival of LINQ... Good times.

4 days ago | parent | next [-]
[deleted]
sobani 4 days ago | parent | prev [-]

How many of those languages can take an expression instead of a lambda?

Func<..> is lambda that can only be invoked.

Expression<Func..>> is an AST of a lambda that can be transformed by your code/library.

Tyr42 3 days ago | parent [-]

R let's you do that, and it gets used by the tidy verse libraries to do things like change the scope variables in the functions are looked up in.