Uma função redundante

Published by SyntaxGardener in

Crie uma função que receba uma string e retorne uma função sem argumentos. Ao chamar a função retornada, ela deve retornar a string original.

Exemplos

var apple = Program.Redundant("apple");
apple() ➞ "apple"

var empty = Program.Redundant("");
empty() ➞ ""

Observações

Retorne um System.Func<string>, não a própria string.