Option module provides a type-safe way to represent values that may or may not exist. An Option<A> is either Some<A> (containing a value) or None (representing absence).
Mental Model
Option<A>is a discriminated union:None | Some<A>Nonerepresents the absence of a value (likenull/undefined, but type-safe)Some<A>wraps a present value of typeA, accessed via.value- Monad: chain operations with
flatMap, compose pipelines withpipe - Immutable: all operations return new
Optionvalues; the input is never mutated - Yieldable: in
Effect.gen, producing the inner value or short-circuiting withNoSuchElementError
