Link to originalCreate abstractions from the concrete, to the degree they are useful for the task at hand.
Abstract vs general
Specific General Abstract interface Stack<T> { push; pop }
— hides the implementation of a stack only.interface Monoid<T> { empty; combine }
— a very high-level pattern many types fit (strings, numbers, sets…).Concrete class IntArrayStack
— fixed array stack forint
.function sort<T>(xs: T[], cmp)
— works for anyT
, but it’s concretely “arrays + a particular algorithm.”