From 0ade499504aa075af1d063108eff0f20a3ce7f60 Mon Sep 17 00:00:00 2001 From: Phil Freeman Date: Tue, 16 Jun 2015 16:33:34 -0700 Subject: [PATCH] Codomain/domain --- docs/Data/Function/Memoize.md | 6 +++--- src/Data/Function/Memoize.purs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Data/Function/Memoize.md b/docs/Data/Function/Memoize.md index 1ca792d..f57e5aa 100644 --- a/docs/Data/Function/Memoize.md +++ b/docs/Data/Function/Memoize.md @@ -4,7 +4,7 @@ This module defines functions for _memoizing_ functions, i.e. creating functions remember their results. This module works by turning a function into a lazily-evaluated data structure depending on -its codomain type. +its domain type. #### `Tabulate` @@ -13,7 +13,7 @@ class Tabulate a where tabulate :: forall r. (a -> r) -> a -> Lazy r ``` -The `Tabulate` class identifies those types which can be used as the codomain of +The `Tabulate` class identifies those types which can be used as the domain of a memoized function, i.e. those for which the results can be _tabulated_. ##### Instances @@ -35,7 +35,7 @@ class Memoize a where The `Memoize` class identifies those function types which can be memoized. -If the codomain type can be tabulated, then functions can be memoized. +If the domain type can be tabulated, then functions can be memoized. ##### Instances ``` purescript diff --git a/src/Data/Function/Memoize.purs b/src/Data/Function/Memoize.purs index 92f2698..776ebd7 100644 --- a/src/Data/Function/Memoize.purs +++ b/src/Data/Function/Memoize.purs @@ -2,7 +2,7 @@ -- | remember their results. -- | -- | This module works by turning a function into a lazily-evaluated data structure depending on --- | its codomain type. +-- | its domain type. module Data.Function.Memoize ( Tabulate @@ -20,7 +20,7 @@ import Data.Lazy import Data.Int.Bits import Data.List --- | The `Tabulate` class identifies those types which can be used as the codomain of +-- | The `Tabulate` class identifies those types which can be used as the domain of -- | a memoized function, i.e. those for which the results can be _tabulated_. class Tabulate a where tabulate :: forall r. (a -> r) -> a -> Lazy r @@ -92,7 +92,7 @@ instance tabulateNat :: Tabulate Int where -- | The `Memoize` class identifies those function types which can be memoized. -- | --- | If the codomain type can be tabulated, then functions can be memoized. +-- | If the domain type can be tabulated, then functions can be memoized. class Memoize a where memoize :: a -> a