rfc:short-syntax-for-anonymous-function
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:short-syntax-for-anonymous-function [2013/02/19 13:04] – [Request for Comments: Short syntax for anonymous functions] md | rfc:short-syntax-for-anonymous-function [2013/02/19 13:13] – [Adding variables to the function scope] md | ||
---|---|---|---|
Line 27: | Line 27: | ||
</ | </ | ||
- | ===== Passing an anonymous function to a function | + | ==== Passing an anonymous function to a function ==== |
The syntax allows for a cleaner way to pass a an anonymous function around. | The syntax allows for a cleaner way to pass a an anonymous function around. | ||
Line 40: | Line 40: | ||
</ | </ | ||
+ | ==== Adding variables to the function scope ==== | ||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | |||
+ | setFormattingStrategy({$string use $filter => | ||
+ | return $filter-> | ||
+ | }); | ||
+ | |||
+ | </ | ||
===== What is common use cases in other language ===== | ===== What is common use cases in other language ===== | ||
==== Building domain specific languages ==== | ==== Building domain specific languages ==== |
rfc/short-syntax-for-anonymous-function.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1