Link Search Menu Expand Document

ArrayOption overview

Added in v0.1.0


Table of contents


Alternative

alt

Signature

export declare const alt: <A>(that: () => ArrayOption<A>) => (fa: ArrayOption<A>) => ArrayOption<A>

Added in v0.1.18

zero

Signature

export declare const zero: <A>() => ArrayOption<A>

Added in v0.1.18

Applicative

of

Signature

export declare const of: <A>(a: A) => ArrayOption<A>

Added in v0.1.18

Apply

ap

Signature

export declare const ap: <A>(fa: ArrayOption<A>) => <B>(fab: ArrayOption<(a: A) => B>) => ArrayOption<B>

Added in v0.1.18

apFirst

Signature

export declare const apFirst: <B>(fb: ArrayOption<B>) => <A>(fa: ArrayOption<A>) => ArrayOption<A>

Added in v0.1.18

apSecond

Signature

export declare const apSecond: <B>(fb: ArrayOption<B>) => <A>(fa: ArrayOption<A>) => ArrayOption<B>

Added in v0.1.18

Functor

map

Signature

export declare const map: <A, B>(f: (a: A) => B) => (fa: ArrayOption<A>) => ArrayOption<B>

Added in v0.1.18

Monad

chain

Signature

export declare const chain: <A, B>(f: (a: A) => ArrayOption<B>) => (fa: ArrayOption<A>) => ArrayOption<B>

Added in v0.1.18

chainFirst

Signature

export declare const chainFirst: <A, B>(f: (a: A) => ArrayOption<B>) => (ma: ArrayOption<A>) => ArrayOption<A>

Added in v0.1.18

chainOptionK

Signature

export declare const chainOptionK: <A, B>(f: (a: A) => Option<B>) => (ma: ArrayOption<A>) => ArrayOption<B>

Added in v0.1.10

flatten

Signature

export declare const flatten: <A>(mma: ArrayOption<ArrayOption<A>>) => ArrayOption<A>

Added in v0.1.18

constructors

fromArray

Signature

export declare const fromArray: <A>(as: A[]) => ArrayOption<A>

Added in v0.1.0

fromOption

Signature

export declare const fromOption: <A>(ma: Option<A>) => ArrayOption<A>

Added in v0.1.0

fromOptionK

Signature

export declare const fromOptionK: <A extends unknown[], B>(f: (...a: A) => Option<B>) => (...a: A) => ArrayOption<B>

Added in v0.1.10

none

Signature

export declare const none: ArrayOption<never>

Added in v0.1.0

some

Signature

export declare const some: <A>(a: A) => ArrayOption<A>

Added in v0.1.0

destructors

fold

Signature

export declare const fold: <A, B>(onNone: () => B[], onSome: (a: A) => B[]) => (as: ArrayOption<A>) => B[]

Added in v0.1.0

getOrElse

Signature

export declare const getOrElse: <A>(onNone: () => A[]) => (as: ArrayOption<A>) => A[]

Added in v0.1.0

instances

Alt

Signature

export declare const Alt: Alt1<'ArrayOption'>

Added in v0.1.18

Alternative

Signature

export declare const Alternative: Alternative1<'ArrayOption'>

Added in v0.1.18

Applicative

Signature

export declare const Applicative: Applicative1<'ArrayOption'>

Added in v0.1.18

Apply

Signature

export declare const Apply: Apply1<'ArrayOption'>

Added in v0.1.18

Functor

Signature

export declare const Functor: Functor1<'ArrayOption'>

Added in v0.1.18

Monad

Signature

export declare const Monad: Monad1<'ArrayOption'>

Added in v0.1.18

URI

Signature

export declare const URI: 'ArrayOption'

Added in v0.1.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v0.1.0

arrayOption

Signature

export declare const arrayOption: Monad1<'ArrayOption'> & Alt1<'ArrayOption'>

Added in v0.1.0

model

ArrayOption (interface)

Signature

export interface ArrayOption<A> extends Array<Option<A>> {}

Added in v0.1.0