Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Codomain/domain
Browse files Browse the repository at this point in the history
  • Loading branch information
paf31 committed Jun 16, 2015
1 parent 327e190 commit 0ade499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/Data/Function/Memoize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Data/Function/Memoize.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 0ade499

Please sign in to comment.