= Sparse map with a default value
Represent a total <function> by storing only selected entries of a finite <partial function> and returning a fixed default for missing keys. A missing payment-count record can denote two zero counts. Storing an explicit default-valued record can have the same observable meaning, so the <abstraction function> need not be injective. Update operations must preserve all unrelated keys and establish the intended change whether or not the key was previously stored.
Back to article page