Skip to main content Link Search Menu Expand Document (external link)

Chunk overview

A simple extension to the Effect Chunk module


Table of contents


Predicates

hasLength

Returns true if the length of self is l

Signature

export declare const hasLength: (l: number) => <A>(self: Chunk.Chunk<A>) => boolean

Utils

findAll

Returns a Chunk of the indexes of all elements of self matching the predicate

Signature

export declare const findAll: <B extends A, A = B>(
  predicate: Predicate.Predicate<A>
) => (self: Chunk.Chunk<B>) => Chunk.Chunk<number>

hasDuplicates

Returns true if the provided Chunk contains duplicates

Signature

export declare const hasDuplicates: <A>(self: Chunk.Chunk<A>) => boolean

takeBut

Returns a chunk containing all elements of self except the n last elements

Signature

export declare const takeBut: (n: number) => <A>(self: Chunk.Chunk<A>) => Chunk.Chunk<A>

takeRightBut

Returns a chunk containing all elements of self except the n first elements

Signature

export declare const takeRightBut: (n: number) => <A>(self: Chunk.Chunk<A>) => Chunk.Chunk<A>