MCPcopy Create free account
hub / github.com/Effect-TS/effect / getSomes

Function getSomes

packages/effect/src/Array.ts:3661–3669  ·  view source on GitHub ↗
(self: any)

Source from the content-addressed store, hash-verified

3659export const getSomes: <T extends Iterable<Option.Option<X>>, X = any>(
3660 self: T
3661) => Array<Option.Option.Value<ReadonlyArray.Infer<T>>> = (self: any) => {
3662 const out: Array<any> = []
3663 for (const a of self) {
3664 if (Option.isSome(a)) {
3665 out.push(a.value)
3666 }
3667 }
3668 return out
3669}
3670
3671/**
3672 * Extracts all failure values from an iterable of `Result`s, discarding

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected