File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ public function test_example_without_do_notation()
38
38
return Identity::of ($ c * $ c );
39
39
});
40
40
});
41
-
42
41
});
43
42
44
43
$ this ->assertEquals (Identity::of (16 ), $ result );
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function interpretation(DooF $f)
35
35
return match ([
36
36
Let::class => function (string $ name , Monad $ m , MonadFree $ next ): Reader {
37
37
return Reader::of (function (Registry $ registry ) use ($ name , $ m , $ next ) {
38
- return $ m ->bind (function ($ v ) use ($ name , $ next , & $ registry ) {
38
+ return $ m ->bind (function ($ v ) use ($ name , $ next , $ registry ) {
39
39
$ registry ->set ($ name , $ v );
40
40
41
41
return $ next ;
@@ -44,9 +44,7 @@ function interpretation(DooF $f)
44
44
},
45
45
In::class => function (array $ names , callable $ fn , callable $ next ): Reader {
46
46
return Reader::of (function (Registry $ registry ) use ($ names , $ fn , $ next ) {
47
- $ args = array_map (function ($ name ) use ($ registry ) {
48
- return $ registry ->get ($ name );
49
- }, $ names );
47
+ $ args = array_map ([$ registry , 'get ' ], $ names );
50
48
51
49
return $ next ($ fn (...$ args ));
52
50
});
You can’t perform that action at this time.
0 commit comments