js-slang
Version:
Javascript-based implementations of Source, written in Typescript
9 lines (8 loc) • 327 B
TypeScript
import { type List, type Pair } from './list';
export type Stream<T = unknown> = null | Pair<T, () => Stream<T>>;
/**
* Makes a Stream out of its arguments\
* LOW-LEVEL FUNCTION, NOT SOURCE
*/
export declare function stream<T>(...elements: T[]): Stream<T>;
export declare function list_to_stream<T>(xs: List<T>): Stream<T>;