projects
/
php-functional.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43e98d8
)
Use fromValue
author
widmogrod
<widmogrod@gmail.com>
Wed, 20 Dec 2017 00:19:35 +0000
(
01:19
+0100)
committer
widmogrod
<widmogrod@gmail.com>
Wed, 20 Dec 2017 00:19:35 +0000
(
01:19
+0100)
src/Functional/functions.php
patch
|
blob
|
history
diff --git
a/src/Functional/functions.php
b/src/Functional/functions.php
index
eab68d6
..
8e5711a
100644
(file)
--- a/
src/Functional/functions.php
+++ b/
src/Functional/functions.php
@@
-283,7
+283,7
@@
function filter(callable $predicate, Foldable $list = null)
return curryN(2, function (callable $predicate, Foldable $list) {
return reduce(function (Listt $list, $x) use ($predicate) {
return call_user_func($predicate, $x)
- ? append($list, from
Iterabl
e($x))
+ ? append($list, from
Valu
e($x))
: $list;
}, Listt::mempty(), $list);
})(...func_get_args());