From 32e51ee5275553b3835c2d54c87bc1a1987b031f Mon Sep 17 00:00:00 2001 From: widmogrod Date: Wed, 20 Dec 2017 01:19:35 +0100 Subject: [PATCH] Use fromValue --- src/Functional/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Functional/functions.php b/src/Functional/functions.php index eab68d6..8e5711a 100644 --- 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, fromIterable($x)) + ? append($list, fromValue($x)) : $list; }, Listt::mempty(), $list); })(...func_get_args()); -- 2.11.0