Skip to content

Instantly share code, notes, and snippets.

@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@bjin
bjin / memorize.hs
Created June 19, 2012 12:54
memorization via ST hashtable
{-# LANGUAGE RankNTypes #-}
import Data.Int
import Control.Monad.ST
import Control.Monad
import Data.Function
import Data.Hashable
import qualified Data.HashTable.ST.Cuckoo as H
type Func a b = (a -> b) -> (a -> b)