Package: effect
Module: Chunk
Reverses the order of elements in a Chunk.
When to use
Use to read or process chunk elements in reverse order.
Details
If the input chunk is a NonEmptyChunk, the reversed chunk is also a
NonEmptyChunk.
Example (Reversing chunks)
import { Chunk } from "effect"
const chunk = Chunk.make(1, 2, 3)
const result = Chunk.reverse(chunk)
console.log(Chunk.toArray(result)) // [3, 2, 1]
Signature
declare const reverse: <S extends Chunk<any>>(self: S) => Chunk.With<S, Chunk.Infer<S>>
Since v2.0.0