Skip to content

Commit af19ac4

Browse files
oguzdumanoglulstrojny
authored andcommitted
Add parentheses into function names (lstrojny#158)
1 parent 7d677bb commit af19ac4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/functional-php.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
- [partial_any()](#partial_any)
2525
- [partial_method()](#partial_method)
2626
- [Currying](#currying)
27-
- [curry](#curry)
28-
- [curry_n](#curry_n)
27+
- [curry()](#curry)
28+
- [curry_n()](#curry_n)
2929
- [Access functions](#access-functions)
3030
- [with()](#with)
3131
- [invoke_if()](#invoke_if)
@@ -43,7 +43,7 @@
4343
- [capture()](#capture)
4444
- [compose()](#compose)
4545
- [tail_recursion()](#tail_recursion)
46-
- [flip](#flip)
46+
- [flip()](#flip)
4747
- [Other](#other)
4848
- [Mathematical functions](#mathematical-functions)
4949
- [Transformation functions](#transformation-functions)
@@ -55,10 +55,10 @@
5555
- [intersperse()](#intersperse)
5656
- [Other](#other-1)
5757
- [Conditional functions](#conditional-functions)
58-
- [if_else](#if_else)
59-
- [match](#match)
58+
- [if_else()](#if_else)
59+
- [match()](#match)
6060
- [Higher order comparison functions](#higher-order-comparison-functions)
61-
- [compare_on & compare_object_hash_on](#compare_on--compare_object_hash_on)
61+
- [compare_on() & compare_object_hash_on()](#compare_on--compare_object_hash_on)
6262
- [Miscellaneous](#miscellaneous)
6363
- [const_function()](#const_function)
6464
- [id()](#id)
@@ -412,7 +412,7 @@ Currying is similar to and often confused with partial application. But instead
412412

413413
Currying can be seen as partially applying one parameter after the other.
414414

415-
## curry
415+
## curry()
416416

417417
If we revisit the example used for partial application, the curried version would be :
418418

@@ -470,7 +470,7 @@ $curriedAdd = curry('add');
470470
$curriedAdd(10)(5)(27)(10); // -> 52
471471
```
472472

473-
## curry_n
473+
## curry_n()
474474

475475
`curry` uses reflection to determine the number of arguments, which can be slow depdening on your requirements. Also, you might want to curry only the first parameters, or your function expects a variable number of parameters. In all cases, you can use `curry_n` instead.
476476

@@ -726,7 +726,7 @@ var_dump($sum_of_range(1, 10000)); // 50005000;
726726

727727
```
728728

729-
## flip
729+
## flip()
730730
Return a new function with the argument order flipped. This can be useful when currying functions like `filter` to provide the data last.
731731

732732
```php
@@ -903,7 +903,7 @@ Applies a callback to each element in the collection and collects the return val
903903

904904
# Conditional functions
905905

906-
## if_else
906+
## if_else()
907907

908908
``callable if_else(callable $if, callable $then, callable $else)``
909909
Returns a new function that will call `$then` if the return of `$if` is truthy, otherwise calls `$else`.
@@ -928,7 +928,7 @@ $message = if_else(greater_than(1), $ifItIs, $ifItIsNot);
928928
echo $message(2); // Yes, 2 is greater than 1
929929
```
930930

931-
## match
931+
## match()
932932

933933
``callable match(array $conditions)``
934934
Returns a new function that behaves like a match operator.

0 commit comments

Comments
 (0)