doddle
    Preparing search index...

    Function seq

    • Creates a Seq from the provided input. See examples for usage.

      Parameters

      • input: readonly never[]

        The input to create the Seq from.

      Returns Seq<never>

      // Array
      seq([1, 2, 3]) // {1, 2, 3}

      // Generator function
      seq(function* () {
      yield 1
      yield 2
      })

      // Doddle yielding a sequence
      seq(doddle(() => [1, 2, 3]))

      // Function returning a sequence
      seq(() => [1, 2, 3])

      // An iterable
      seq(seq([1, 2, 3]))

      // An array-like object, such as a NodeList:
      seq(document.getElementsByTagName("div"))

      // An ITERATOR, which is a special case that will be cached.
      seq(seq([1, 2, 3])[Symbol.iterator]())

      // ⛔ Strings are not allowed here
      seq("hello")
    • Creates a Seq from the provided input. See examples for usage.

      Type Parameters

      • E

      Parameters

      Returns Seq<E>

      // Array
      seq([1, 2, 3]) // {1, 2, 3}

      // Generator function
      seq(function* () {
      yield 1
      yield 2
      })

      // Doddle yielding a sequence
      seq(doddle(() => [1, 2, 3]))

      // Function returning a sequence
      seq(() => [1, 2, 3])

      // An iterable
      seq(seq([1, 2, 3]))

      // An array-like object, such as a NodeList:
      seq(document.getElementsByTagName("div"))

      // An ITERATOR, which is a special case that will be cached.
      seq(seq([1, 2, 3])[Symbol.iterator]())

      // ⛔ Strings are not allowed here
      seq("hello")
    • Creates a Seq from the provided input. See examples for usage.

      Type Parameters

      • E

      Parameters

      • input: readonly E[]

        The input to create the Seq from.

      Returns Seq<E>

      // Array
      seq([1, 2, 3]) // {1, 2, 3}

      // Generator function
      seq(function* () {
      yield 1
      yield 2
      })

      // Doddle yielding a sequence
      seq(doddle(() => [1, 2, 3]))

      // Function returning a sequence
      seq(() => [1, 2, 3])

      // An iterable
      seq(seq([1, 2, 3]))

      // An array-like object, such as a NodeList:
      seq(document.getElementsByTagName("div"))

      // An ITERATOR, which is a special case that will be cached.
      seq(seq([1, 2, 3])[Symbol.iterator]())

      // ⛔ Strings are not allowed here
      seq("hello")
    • Creates a Seq from the provided input. See examples for usage.

      Type Parameters

      • E

      Parameters

      Returns Seq<E>

      // Array
      seq([1, 2, 3]) // {1, 2, 3}

      // Generator function
      seq(function* () {
      yield 1
      yield 2
      })

      // Doddle yielding a sequence
      seq(doddle(() => [1, 2, 3]))

      // Function returning a sequence
      seq(() => [1, 2, 3])

      // An iterable
      seq(seq([1, 2, 3]))

      // An array-like object, such as a NodeList:
      seq(document.getElementsByTagName("div"))

      // An ITERATOR, which is a special case that will be cached.
      seq(seq([1, 2, 3])[Symbol.iterator]())

      // ⛔ Strings are not allowed here
      seq("hello")