Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Extra utility functions to manipulate Series
.
Synopsis
- zipLogic :: MonadLogic m => m a -> m b -> m (a, b)
- zipLogic3 :: MonadLogic m => m a -> m b -> m c -> m (a, b, c)
Zipping
zipLogic :: MonadLogic m => m a -> m b -> m (a, b) Source #
One-to-One zipping of 2 MonadLogic
instances. You can use for
Series
like this:
>>>
list 2 $ (series :: Series Identity Char) `zipLogic` (series :: Series Identity Int)
[('a',0),('b',1),('c',-1)]
Notice the difference with ><
:
>>>
list 2 $ (series :: Series Identity Char) >< (series :: Series Identity Int)
[('a',0),('b',0),('a',1),('c',0),('a',-1),...,('b',-2),('c',-2)]
zipLogic3 :: MonadLogic m => m a -> m b -> m c -> m (a, b, c) Source #
One-to-One zipping of 3 MonadLogic
instances. You can use for
Series
like this:
>>>
list 3 $ zipLogic3 (series :: Series Identity Char) (series :: Series Identity Int) (series :: Series Identity Text)
[('a',0,""),('b',1,"a"),('c',-1,"b"),('d',2,"aa")]