Module

Pha.Util

Package
purescript-pha
Repository
gbagan/purescript-pha

#memoize Source

memoize :: forall a b. (a -> b) -> a -> b

Memoize the function f. If the argument of f differs from the previous call, then f is recomputed.

#memoCompose Source

memoCompose :: forall a b c. (a -> b) -> (b -> c) -> a -> c

Memoize the composition of two functions

#memoCompose2 Source

memoCompose2 :: forall a b c d. (a -> b) -> (a -> c) -> (b -> c -> d) -> a -> d

#memoCompose3 Source

memoCompose3 :: forall a b c d e. (a -> b) -> (a -> c) -> (a -> d) -> (b -> c -> d -> e) -> a -> e

#memoCompose' Source

memoCompose' :: forall a b c. (a -> Record b) -> (Record b -> c) -> a -> c