Fun With Anonymous Methods: Using Higher-Order Functions in Delphi

Since 2009, the Delphi language (or better, its Object Pascal dialect) has supported anonymous methods.
What Is an Anonymous Method?
Not surprisingly, an anonymous method is a procedure or a function that does not have an associated name. An anonymous method treats a block of code just like a value so that it can be assigned to a variable, used as a parameter to a method, or returned by a function as its result value.

Link: https://dzone.com/articles/fun-with-anonymous-methods-using-higher-order-func?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev