hackage.haskell.org : 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:
Registry
-
Source
- Homepage
- JSON
- codemeta.json
purl: pkg:hackage/bit-stream
Keywords:
bsd3
, deprecated
, library
, unclassified
, Propose Tags
, dynamic-programming
, infinite-stream
, lazy-streams
, memoization
, memoize
, recursive-functions
License: BSD-3-Clause
Latest release: over 8 years ago
First release: over 8 years ago
Dependent repositories: 1
Downloads: 2,612 total
Stars: 60 on GitHub
Forks: 6 on GitHub
Total Commits: 150
Committers: 4
Average commits per author: 37.5
Development Distribution Score (DDS): 0.033
More commit stats: commits.ecosyste.ms
See more repository details: repos.ecosyste.ms
Last synced: 2 days ago