array-memoize: Memoization combinators for finite subsets of function domains using arrays

[ bsd3, library, syntax ] [ Propose Tags ]

Memoization combinators are great for providing high-performance Haskell programs, but they can be even faster if memoization is performed on a finite, discrete domain as an array can then be used.

This package provides various combinators for doing just this, including also combinators for quanitzing and discretizing Float/Double-valued functions.

Example:

fibA :: Int -> Int
fibA 0 = 1
fibA 1 = 1
fibA n = fibB (n - 1) + fibB (n - 2)
fibB = arrayMemo (0, 1000) fibA

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.5.0, 0.6.0
Dependencies array (>=0.4), base (<5) [details]
License BSD-3-Clause
Copyright Dominic Orchard, 2014
Author Dominic Orchard
Maintainer Dominic Orchard
Category Syntax
Source repo head: git clone https://github.com/dorchard/array-memoize
Uploaded by DominicOrchard at 2014-03-31T11:46:20Z
Distributions LTSHaskell:0.6.0, NixOS:0.6.0, Stackage:0.6.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2940 total (17 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]