Pergunta de entrevista da empresa Elastic

Write a function that basically does what one of the underscore functions do.