> The list of integers could be replaced by using tuples and reading their lengths to do basic arithmetic.
Is that anything like church encoding?
https://www.wikiwand.com/en/Church_encoding#/Church_numerals
Is that anything like church encoding?
https://www.wikiwand.com/en/Church_encoding#/Church_numerals
type two = [0, 0]
type three = [0, 0, 0]
type five = [...two, ...three]
type TupleToNumber<T extends any[]> = T[“length”]
const num: TupleToNumber<five> = 5