Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support for non-empty list with ZIO.foreach (or ZIO.collectAll and similar operations) #2554

@afsalthaj

Description

@afsalthaj

As of now, passing a nonEmptyList (which can be scala.collection.immutable.::[A]) to ZIO.foreach (or ZIO.collectAll and similar operations if any) returns a List which would mean it could be empty. However, in practice, passing a non-empty list to such operations can never yield an empty list.

Hence, it is a good idea if ZIO could support a collectAll or foreach operation that can operate on :: and returns a ::

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions