Update map & bind signatures
authorwidmogrod <widmogrod@gmail.com>
Sat, 23 Dec 2017 21:07:26 +0000 (22:07 +0100)
committerwidmogrod <widmogrod@gmail.com>
Sat, 23 Dec 2017 21:07:26 +0000 (22:07 +0100)
src/Functional/functions.php

index bffbbea..1012d2f 100644 (file)
@@ -169,7 +169,7 @@ const map = 'Widmogrod\Functional\map';
  * @param callable $transformation
  * @param Functor  $value
  */
-function map(callable $transformation = null, Functor $value = null)
+function map(callable $transformation, Functor $value = null)
 {
     return curryN(2, function (callable $transformation, Functor $value) {
         return $value->map($transformation);
@@ -189,7 +189,7 @@ const bind = 'Widmogrod\Functional\bind';
  * @param callable $function
  * @param Monad    $value
  */
-function bind(callable $function = null, Monad $value = null)
+function bind(callable $function, Monad $value = null)
 {
     return curryN(2, function (callable $function, Monad $value) {
         return $value->bind($function);