effect-io-ai

Package: effect
Module: Iterable

Iterable.prependAll

Prepends the specified prefix iterable to the beginning of the specified iterable.

Example

import * as assert from "node:assert"
import { Iterable } from "effect"

assert.deepStrictEqual(
  Array.from(Iterable.prependAll([1, 2], ["a", "b"])),
  ["a", "b", 1, 2]
)

Signature

declare const prependAll: { <B>(that: Iterable<B>): <A>(self: Iterable<A>) => Iterable<A | B>; <A, B>(self: Iterable<A>, that: Iterable<B>): Iterable<A | B>; }

Source

Since v2.0.0