array-memoize: Memoization combinators using arrays for finite sub-domains of functions

[ 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 since an array can then be used to store results.

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


fib' :: (Int -> Int) -> Int -> Int
fib' _ 0 = 1
fib' _ 1 = 1
fib' rec n = rec (n - 1) + rec (n - 2)
fib :: Int -> Int
fib = arrayMemoFix (0, 1000) fib'




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • 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
Uploaded by DominicOrchard at 2014-04-04T15:58:23Z
Distributions LTSHaskell:0.6.0, NixOS:0.6.0, Stackage:0.6.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2974 total (13 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]