It's not me, it's them!
import { fromNullable } from 'fp-ts/lib/Option'
function safeFind(arr: Array, f: A => Boolean): Option {
return fromNullable(arr.find(f))
}
[1, 2, 3].find(x => x < 3) // 2
[1, 2, 3].find(x => x < 0) // undefined
safeFind([1, 2, 3], x => x < 3) // some(2)
safeFind([1, 2, 3], x => x < 0) // none