Module
Gesso.State
- Package
- purescript-gesso
- Repository
- smilack/purescript-gesso
Types used when dealing with multiple versions of the same thing - most often, the application state.
#Compare Source
type Compare a = { new :: a, old :: a }
Two different versions of the same thing. Used when the old and new
versions are probably not immediately sequential - there may have been many
versions between old
and new
.
#History Source
type History a = { changed :: Boolean, new :: a, old :: a, original :: a }
A record for keeping track of changes to a value which may change many times, when it is important to track the original, current, and previous values, and comparing the values directly is impossible. Useful as an accumulator when folding.