function thunk(fn, n, ac) {
return fn.bind(null, n, ac);
}
const trampoline = res => {
while (typeof res === 'function') { res = res(); }
return res;
}
function chirp(n,string='') {
return trampoline(n-1 && (thunk(chirp,n-1,string=string+'chirp-')) || string+'chirp')
}
chirp(9000)
X = n => n ? (n & 1 ? '-chirp' : '') + X(n >> 1) + X(n >> 1) : ''
chirp = n => X(n).slice(1)