export type List = [T, any] | 0; export type Talkback = 0 | 1; export type Signal = | ({ tag: 0 } & [(talkback: Talkback) => void]) | ({ tag: 1 } & [A]) | 0; export interface Sink { (signal: Signal): void; } export interface Source { (sink: Sink): void; } export interface Operator { (source: Source): Source; } export type Subscription = [() => void]; export type Observer = [(value: A) => void, () => void]; export type Subject = [Source, (value: A) => void, () => void];