@@ 10-19 (lines=10) @@ | ||
7 | * |
|
8 | * @return mixed |
|
9 | */ |
|
10 | function id() |
|
11 | { |
|
12 | $args = func_get_args(); |
|
13 | ||
14 | $id = function ($x) { |
|
15 | return $x; |
|
16 | }; |
|
17 | ||
18 | return call_user_func_array(partial($id), $args); |
|
19 | } |
|
20 |
@@ 10-19 (lines=10) @@ | ||
7 | * |
|
8 | * @return mixed |
|
9 | */ |
|
10 | function not() |
|
11 | { |
|
12 | $args = func_get_args(); |
|
13 | ||
14 | $not = function ($x) { |
|
15 | return !$x; |
|
16 | }; |
|
17 | ||
18 | return call_user_func_array(partial($not), $args); |
|
19 | } |
|
20 |