Skip to content

Commit 69affc2

Browse files
committed
ListOps: Use more expressive variable names
1 parent 77e641b commit 69affc2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exercises/practice/list-ops/ListOps.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function concat(array $list1, array ...$listn): array
3737
}
3838

3939
/**
40-
* @param callable(mixed $el): bool $predicate
40+
* @param callable(mixed $item): bool $predicate
4141
*/
4242
public function filter(callable $predicate, array $list): array
4343
{
@@ -50,23 +50,23 @@ public function length(array $list): int
5050
}
5151

5252
/**
53-
* @param callable(mixed $el): mixed $function
53+
* @param callable(mixed $item): mixed $function
5454
*/
5555
public function map(callable $function, array $list): array
5656
{
5757
throw new \BadMethodCallException("Implement the map function");
5858
}
5959

6060
/**
61-
* @param callable(mixed $acc, mixed $el): mixed $function
61+
* @param callable(mixed $accumulator, mixed $item): mixed $function
6262
*/
6363
public function foldl(callable $function, array $list, $accumulator)
6464
{
6565
throw new \BadMethodCallException("Implement the foldl function");
6666
}
6767

6868
/**
69-
* @param callable(mixed $acc, mixed $el): mixed $function
69+
* @param callable(mixed $accumulator, mixed $item): mixed $function
7070
*/
7171
public function foldr(callable $function, array $list, $accumulator)
7272
{

0 commit comments

Comments
 (0)