smallcheck-series-0.7.1.0: Extra SmallCheck series and utilities
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.SmallCheck.Series.Utils

Contents

Description

Extra utility functions to manipulate Series.

Synopsis

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")]