EffectTalk

Chunk.append, prepend, and take

Chunk supports immutable operations: Chunk.append, Chunk.prepend, Chunk.take(n), Chunk.drop(n). Each returns a new Chunk—no mutation.

These operations are optimized for Chunk's internal structure.

  • Use Chunk.append(chunk, element) to add at end
  • Use Chunk.prepend(chunk, element) to add at start
  • Use Chunk.take(chunk, n) for first n elements
Loading code editor...