/** * Atomically compute the least element in the array, if it exists. * * @tsplus static effect/core/stm/TArray.Aspects minMaybe * @tsplus pipeable effect/core/stm/TArray minMaybe */ export function minMaybe(ord: Ord) { return (self: TArray): STM> => self.reduceMaybe( (acc, a) => (ord.lt(a, acc) ? a : acc) ) }