The tuple-gen package
Generating tuples like this: [(x, y) | x <- [1..], y <- [1..]] generates tuples that change only in the second position.
This library uses increasingly bigger hyperplanes to generate tuples.
It uses the Enum instances that are also used in the Prelude.
Thereby tuples with arbitrary starting values and types can be enumerated.
Example: ( enumFrom (0,(1,2),3) ) :: [(Word8,(Word8,Word8),Word8)]
evaluates to [(0,(1,2),3), (0,(2,1),4), (0,(3,0),5), ...].
Further explanations are planned to appear in the Monad Reader issue 20.
Properties
| Versions | 1.0, 1.1, 2.0 |
|---|---|
| Dependencies | base (4.*), combinat (0.2.4.*) |
| License | BSD3 |
| Author | Tillmann Vogt |
| Maintainer | Tillmann.Vogt@rwth-aachen.de |
| Category | Data |
| Upload date | Sun Mar 11 14:49:56 UTC 2012 |
| Uploaded by | TillmannVogt |
| Built on | ghc-7.4 |
Modules
- Data
- Tuple
Downloads
- tuple-gen-2.0.tar.gz (Cabal source package)
- package description (included in the package)