effect-io-ai

Package: effect
Module: Chunk

Chunk.modify

Apply a function to the element at the specified index, creating a new Chunk, or returning the input if the index is out of bounds.

Signature

declare const modify: { <A, B>(i: number, f: (a: A) => B): (self: Chunk<A>) => Chunk<A | B>; <A, B>(self: Chunk<A>, i: number, f: (a: A) => B): Chunk<A | B>; }

Source

Since v2.0.0