FreeSemigroup overview
This module is experimental
Experimental features are published in order to get early feedback from the community, see these tracking issues for further discussions and enhancements.
A feature tagged as Experimental is in a high state of flux, you’re at risk of it changing without notice.
Added in v2.2.7
Table of contents
constructors
concat
Signature
export declare const concat: <A>(left: FreeSemigroup<A>, right: FreeSemigroup<A>) => FreeSemigroup<A>
Added in v2.2.7
of
Signature
export declare const of: <A>(a: A) => FreeSemigroup<A>
Added in v2.2.7
destructors
fold
Signature
export declare const fold: <A, R>(
onOf: (value: A) => R,
onConcat: (left: FreeSemigroup<A>, right: FreeSemigroup<A>) => R
) => (f: FreeSemigroup<A>) => R
Added in v2.2.7
instances
getSemigroup
Signature
export declare function getSemigroup<A = never>(): Semigroup<FreeSemigroup<A>>
Added in v2.2.7
model
Concat (interface)
Signature
export interface Concat<A> {
readonly _tag: 'Concat'
readonly left: FreeSemigroup<A>
readonly right: FreeSemigroup<A>
}
Added in v2.2.7
FreeSemigroup (type alias)
Signature
export type FreeSemigroup<A> = Of<A> | Concat<A>
Added in v2.2.7
Of (interface)
Signature
export interface Of<A> {
readonly _tag: 'Of'
readonly value: A
}
Added in v2.2.7