Skip to content

Instantly share code, notes, and snippets.

View micheledisalvatore's full-sized avatar

Michele Di Salvatore micheledisalvatore

View GitHub Profile
let invocationsCounter = 0
function f(s) {
const stringsOfO = 'o'.repeat(invocationsCounter)
if (s) {
return `f${stringsOfO}${s}`
}
invocationsCounter++
return (() => f)()
}