Question d’entretien chez Attentive

Asked to write a function