id | title |
---|---|
Store |
Module Store |
Signature (data type) Source
export class Store<S, A> {
constructor(readonly peek: (s: S) => A, readonly pos: S) {}
...
}
Signature (method) Source
extend<B>(f: (sa: Store<S, A>) => B): Store<S, B> { ... }
Added in v1.0.0
Signature (method) Source
extract(): A { ... }
Added in v1.0.0
Signature (method) Source
inspect(): string { ... }
Added in v1.0.0
Signature (method) Source
map<B>(f: (a: A) => B): Store<S, B> { ... }
Added in v1.0.0
Reposition the focus at the specified position
Signature (method) Source
seek(s: S): Store<S, A> { ... }
Added in v1.0.0
Signature (method) Source
toString(): string { ... }
Added in v1.0.0
Added in v1.0.0
Signature (constant) Source
export const store: Comonad2<URI> = ...
Added in v1.0.0
Extract a collection of values from positions which depend on the current position
Signature (function) Source
export function experiment<F>(F: Functor<F>): <S>(f: (s: S) => HKT<F, S>) => <A>(sa: Store<S, A>) => HKT<F, A> { ... }
Added in v1.0.0
Extract a value from a position which depends on the current position
Signature (function) Source
export const peeks = <S>(f: Endomorphism<S>) => <A>(sa: Store<S, A>) => (s: S): A => { ... }
Added in v1.0.0
Reposition the focus at the specified position, which depends on the current position
Signature (function) Source
export const seeks = <S>(f: Endomorphism<S>) => <A>(sa: Store<S, A>): Store<S, A> => { ... }
Added in v1.0.0