Skip to content

Latest commit

 

History

History
129 lines (79 loc) · 2.54 KB

Store.md

File metadata and controls

129 lines (79 loc) · 2.54 KB
id title
Store
Module Store

← Index

Source

Store

Signature (data type) Source

export class Store<S, A> {
  constructor(readonly peek: (s: S) => A, readonly pos: S) {}
  ...
}

extend

Signature (method) Source

extend<B>(f: (sa: Store<S, A>) => B): Store<S, B>  { ... }

Added in v1.0.0

extract

Signature (method) Source

extract(): A  { ... }

Added in v1.0.0

inspect

Signature (method) Source

inspect(): string  { ... }

Added in v1.0.0

map

Signature (method) Source

map<B>(f: (a: A) => B): Store<S, B>  { ... }

Added in v1.0.0

seek

Reposition the focus at the specified position

Signature (method) Source

seek(s: S): Store<S, A>  { ... }

Added in v1.0.0

toString

Signature (method) Source

toString(): string  { ... }

Added in v1.0.0

Added in v1.0.0

store

Signature (constant) Source

export const store: Comonad2<URI> = ...

Added in v1.0.0

experiment

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

peeks

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

seeks

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