We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ddd7e8 commit dffc7a5Copy full SHA for dffc7a5
src/Functional/functions.php
@@ -398,20 +398,10 @@ function liftM2(
398
Monad $ma = null,
399
Monad $mb = null
400
) {
401
- return curryN(
402
- 3,
403
- function (
404
- callable $transformation,
405
- Monad $ma,
406
- Monad $mb
407
- ) {
408
- return $ma->bind(function ($a) use ($mb, $transformation) {
409
- return $mb->map(function ($b) use ($a, $transformation) {
410
- return $transformation($a, $b);
411
- });
412
413
- }
414
- )(...func_get_args());
+ return call_user_func_array(
+ liftA2,
+ func_get_args()
+ );
415
}
416
417
/**
0 commit comments