TypeScript codes from Think Complexity by Allen B. Downey