Example #1
0
 def zip(
     self,
     fa: IdState[S, A],
     fb: IdState[S, A],
     *fs: IdState[S, A],
 ) -> IdState[S, List[A]]:
     v = ListTraverse().sequence(List(fa, fb, *fs), IdState)  # type: ignore
     return cast(IdState[S, List[A]], v)
Example #2
0
 def zip(
     self,
     fa: EitherState[E, S, A],
     fb: EitherState[E, S, A],
     *fs: EitherState[E, S, A],
 ) -> EitherState[E, S, List[A]]:
     v = ListTraverse().sequence(List(fa, fb, *fs),
                                 EitherState)  # type: ignore
     return cast(EitherState[E, S, List[A]], v)
Example #3
0
 def zip(
     self,
     fa: MaybeState[S, A],
     fb: MaybeState[S, A],
     *fs: MaybeState[S, A],
 ) -> MaybeState[S, List[A]]:
     v = ListTraverse().sequence(List(fa, fb, *fs),
                                 MaybeState)  # type: ignore
     return cast(MaybeState[S, List[A]], v)
Example #4
0
 def zip(
     self,
     fa: TmuxIOState[S, A],
     fb: TmuxIOState[S, A],
     *fs: TmuxIOState[S, A],
 ) -> TmuxIOState[S, List[A]]:
     v = ListTraverse().sequence(List(fa, fb, *fs),
                                 TmuxIOState)  # type: ignore
     return cast(TmuxIOState[S, List[A]], v)
Example #5
0
 def zip(self, fa: StateT[G, S, A], fb: StateT[G, S, A],
         *fs: StateT[G, S, A]) -> StateT[G, S, List[A]]:
     v = ListTraverse().sequence(
         cast(TraverseF[TraverseG[A]], List(fa, fb, *fs)), state_tpe)
     return cast(StateT[G, S, List[A]], v)
Example #6
0
 def zip(self, fa: Maybe[A], fb: Maybe[B], *fs: Maybe) -> Maybe:
     return ListTraverse().sequence(List(fa, fb, *fs), Maybe)
Example #7
0
 def zip(self, fa: Either[A, B], fb: Either[C, D], *fs: Either) -> Either:
     return ListTraverse().sequence(List(fa, fb, *fs), Either)