From bb069ce2600559d9583c23d1ea6479a3a30ded41 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Tue, 17 Jul 2018 11:16:32 +0200 Subject: [PATCH] Update page 'P# 1.0 Draft Specification' --- P%23-1.0-Draft-Specification.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/P%23-1.0-Draft-Specification.md b/P%23-1.0-Draft-Specification.md index a823b67..131f130 100644 --- a/P%23-1.0-Draft-Specification.md +++ b/P%23-1.0-Draft-Specification.md @@ -347,7 +347,9 @@ The above expression in PHP will output 't' and this is an unexpected result, bu TODO ## 8. Object-Oriented Programming -### 8.X. Anonymous Functions +TODO + +## 9. Anonymous Functions Anonymous functions, also known as closures, allow the creation of functions which have no specified name. In P#, anonymous function arguments can take a default value exactly like standard function arguments. The default value associated with the function argument can be any complex expression including function calls. <% @@ -358,4 +360,4 @@ Anonymous functions, also known as closures, allow the creation of functions whi $anon('Welcome guest!'); //You should see 'Welcome guest!' %> - +Anonymous function can be defined in a method body.