Domanda di colloquio di B&H Photo Video

I was asked a logic question about building a function.