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

Function fromIterable

packages/effect/src/Option.ts:487–492  ·  view source on GitHub ↗
(collection: Iterable<A>)

Source from the content-addressed store, hash-verified

485 * @since 2.0.0
486 */
487export const fromIterable = <A>(collection: Iterable<A>): Option<A> => {
488 for (const a of collection) {
489 return some(a)
490 }
491 return none()
492}
493
494/**
495 * Converts a `Result` into an `Option`, keeping only the success value.

Callers

nothing calls this directly

Calls 2

someFunction · 0.70
noneFunction · 0.70

Tested by

no test coverage detected