tuple-gen: Enum instances for tuples where the digits increase with the same speed
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.
Downloads
- tuple-gen-2.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 1.0, 1.1, 2.0 |
---|---|
Dependencies | base (>=4 && <5), combinat (>=0.2.4 && <0.2.5) [details] |
License | BSD-3-Clause |
Author | Tillmann Vogt |
Maintainer | Tillmann.Vogt@rwth-aachen.de |
Category | Data |
Uploaded | by TillmannVogt at 2012-03-11T14:49:56Z |
Distributions | |
Reverse Dependencies | 2 direct, 25 indirect [details] |
Downloads | 2477 total (1 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |