bit-stream
[Index] [Quick Jump] Package maintainers For package maintainers and hackage trustees Candidates Lazy, infinite, compact stream of Bool with O(1) indexing. Most useful for memoization of predicates. Consider following predicate: Its computation is expensive, so we'd like to memoize its values into BitStream using tabulate and access this stream via index instead of recalculation of isOdd: We can do even better by replacing part of recursive calls to isOdd by indexing memoized values. Write isOddF such that isOdd = fix isOddF: and use tabulateFix: Define a predicate, which checks whether its argument is a prime number by trial division. Convert it to unfixed form: Create its memoized version for faster evaluation:
hackage.haskell.org
0.1.0.2
over 8 years ago
3
2,618 total
1
Links
| Registry | hackage.haskell.org |
| Source | Repository |
| Homepage | Homepage |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:hackage/bit-stream
spec |
| License | BSD-3-Clause |
| First Release | over 8 years ago |
| Last Synced | 2 days ago |
Repository
| Stars | 60 on GitHub |
| Forks | 6 on GitHub |
| Commits | 150 |
| Committers | 4 |
| Avg per Author | 37.5 |
| DDS | 0.033 |