File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
tests/Runtime/Functions/Collection Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 99
1010use function Fp \Collection \sequenceEither ;
1111use function Fp \Collection \sequenceEitherAcc ;
12+ use function Fp \Collection \sequenceEitherT ;
1213use function Fp \Collection \traverseEither ;
1314use function Fp \Collection \traverseEitherAcc ;
1415use function Fp \Collection \traverseEitherKV ;
@@ -128,6 +129,22 @@ public function testLazySequence(): void
128129 ])
129130 );
130131
132+ $ this ->assertEquals (
133+ Either::right ([
134+ 'fst ' => 1 ,
135+ 'snd ' => 2 ,
136+ ]),
137+ sequenceEither ([
138+ 'fst ' => fn () => Either::right (1 ),
139+ 'snd ' => fn () => Either::right (2 ),
140+ ])
141+ );
142+
143+ $ this ->assertEquals (
144+ Either::right ([1 , 2 ]),
145+ sequenceEitherT (Either::right (1 ), Either::right (2 )),
146+ );
147+
131148 $ this ->assertEquals (
132149 Either::left ('error ' ),
133150 sequenceEither ([
You can’t perform that action at this time.
0 commit comments