Similar to Array.find()
but returns the result of the callback function as opposed to the element itself.
function findValue<T>(arr: T[], fn: Func<any | Falsy>)
// Example:
const callback = (n: number) => n > 2 ? n * n : null
findValue([1, 2, 3, 4], callback) //=> 9