import { $type, Eval, HKT, Kind, TyK, TyVar } from '@fp4ts/core'; import { Eq, Monoid } from '@fp4ts/cats-kernel'; import { Functor } from '../../functor'; import { SemigroupK } from '../../semigroup-k'; import { CoflatMap } from '../../coflat-map'; import { MonoidK } from '../../monoid-k'; import { Monad } from '../../monad'; import { Foldable } from '../../foldable'; import { Applicative } from '../../applicative'; import { Traversable } from '../../traversable'; import { Align } from '../../align'; import { EqK } from '../../eq-k'; import { Option } from '../option'; import { Either } from '../either'; import { Ior } from '../ior'; import { List } from './list'; import { Vector } from './vector'; import { View } from './view'; export type NonEmptyList = _NonEmptyList; export declare const NonEmptyList: NonEmptyListObj; declare class _NonEmptyList { readonly head: A; readonly tail: List; constructor(head: A, tail: List); get init(): List; get last(): A; get uncons(): [A, List]; get popLast(): [A, List]; get size(): number; get iterator(): Iterator; [Symbol.iterator](): Iterator; get reverseIterator(): Iterator; get reverse(): NonEmptyList; get toArray(): A[]; get toList(): List; get view(): View; get toVector(): Vector; prepend(this: NonEmptyList, that: B): NonEmptyList; cons(this: NonEmptyList, that: B): NonEmptyList; '+::'(this: NonEmptyList, that: B): NonEmptyList; append(this: NonEmptyList, that: B): NonEmptyList; snoc(this: NonEmptyList, that: B): NonEmptyList; '::+'(this: NonEmptyList, that: B): NonEmptyList; concat(this: NonEmptyList, that: List): NonEmptyList; '+++'(this: NonEmptyList, that: List): NonEmptyList; concatNel(this: NonEmptyList, that: NonEmptyList): NonEmptyList; elem(idx: number): A; '!!'(idx: number): A; elemOption(idx: number): Option; '!?'(idx: number): Option; all(p: (a: A) => boolean): boolean; any(p: (a: A) => boolean): boolean; count(p: (a: A) => boolean): number; take(n: number): List; takeWhile(p: (a: A) => a is B): List; takeWhile(p: (a: A) => boolean): List; takeRight(n: number): List; drop(n: number): List; dropWhile(p: (a: A) => boolean): List; dropRight(n: number): List; slice(from: number, to: number): List; splitAt(idx: number): [List, List]; filter(p: (a: A) => boolean): List; collect(f: (a: A) => Option): List; collectWhile(f: (a: A) => Option): List; map(f: (a: A) => B): NonEmptyList; flatMap(f: (a: A) => NonEmptyList): NonEmptyList; coflatMap(f: (as: NonEmptyList) => B): NonEmptyList; flatten(this: NonEmptyList>): NonEmptyList; align(that: NonEmptyList): NonEmptyList>; zip(that: NonEmptyList): NonEmptyList<[A, B]>; zipWith(that: NonEmptyList, f: (a: A, b: B) => C): NonEmptyList; get zipWithIndex(): NonEmptyList<[A, number]>; zipAll(this: NonEmptyList, that: NonEmptyList, defaultL: () => AA, defaultR: () => B): NonEmptyList<[AA, B]>; zipAllWith(this: NonEmptyList, that: NonEmptyList, defaultL: () => AA, defaultR: () => B, f: (a: AA, b: B) => C): NonEmptyList; forEach(f: (a: A) => void): void; partition(f: (a: A) => boolean): [List, List]; partitionWith(f: (a: A) => Either): [List, List]; foldLeft(z: B, f: (b: B, a: A) => B): B; foldLeft1(this: NonEmptyList, f: (x: B, y: B) => B): B; foldRight(ez: Eval, f: (a: A, eb: Eval) => Eval): Eval; foldRight1(this: NonEmptyList, f: (x: B, ey: Eval) => Eval): Eval; foldRight_(z: B, f: (a: A, b: B) => B): B; foldRight1_(this: NonEmptyList, f: (x: B, y: B) => B): B; foldMap(M: Monoid): (f: (a: A) => M) => M; foldMapLeft(M: Monoid): (f: (a: A) => M) => M; foldMapK(F: MonoidK): (f: (a: A) => Kind) => Kind; traverse(G: Applicative): (f: (a: A) => Kind) => Kind]>; equals(this: NonEmptyList, E: Eq, that: NonEmptyList): boolean; notEquals(this: NonEmptyList, E: Eq, that: NonEmptyList): boolean; } interface NonEmptyListObj { (h: A, tl: List): NonEmptyList; pure(a: A): NonEmptyList; of(h: A, ...tl: A[]): NonEmptyList; fromList(xs: List): Option>; unsafeFromList(xs: List): NonEmptyList; fromVector(xs: Vector): Option>; fromArray(xs: A[]): Option>; fromIterator(it: Iterator): Option>; EqK: EqK; SemigroupK: SemigroupK; Functor: Functor; Align: Align; CoflatMap: CoflatMap; Monad: Monad; Foldable: Foldable; Traversable: Traversable; } interface _NonEmptyList extends HKT { } /** * @category Type Constructor * @category Collection */ export interface NonEmptyListF extends TyK<[unknown]> { [$type]: NonEmptyList>; } export {}; //# sourceMappingURL=non-empty-list.d.ts.map