Function streamFromModifiable

  • Creates a Stream from an array but, unlike stream, allows input modifications. That's useful for operations like Stream.sortBy and Stream.shuffle which otherwise copy input to the new array.

    Type Parameters

    • T

      Elements type

    Parameters

    • input: T[]

      Array allowed for modifications to create stream from

    Returns Stream<T>

    A stream created from the provided modifiable array.