Locate the first element matching predicate, wrapped in an Option — none when nothing matches, avoiding the native undefined ambiguity.
predicate
Option
none
undefined
Dual API — works data-first or curried for use in pipe.
pipe
pipe( users, Arrays.find((u) => u.email === "a@b.co"), ) // { some: true, value: { ... } } | { some: false } Copy
pipe( users, Arrays.find((u) => u.email === "a@b.co"), ) // { some: true, value: { ... } } | { some: false }
Locate the first element matching
predicate, wrapped in anOption—nonewhen nothing matches, avoiding the nativeundefinedambiguity.Dual API — works data-first or curried for use in
pipe.