Uma função redundante

Published by bangyen in

Escreva uma função que receba uma string s e retorne uma função que retorne s.

Exemplos

let f1 = redundant("apple")
f1() ➞ "apple"

let f2 = redundant("pear")
f2() ➞ "pear"

let f3 = redundant("")
f3() ➞ ""

Observações

Sua função deve retornar uma função, não uma string.