UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

14 lines (13 loc) 350 B
export default class Queue<T> { private head?; private tail?; length: number; constructor(elems?: T[]); push: (el: T) => this; pop: () => T; peek: () => T | undefined; isEmpty: () => boolean; static from<T>(elems: T[]): Queue<T>; map: <B>(fn: (el: T) => B) => B[]; forEach: (fx: (el: T) => any) => void; }