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

Skip to content

Add extension functions to convert Array to persistent collections #159

@SageDroid

Description

@SageDroid

The plus and minus extension functions for PersistentCollection, PersistentList and PersistentSet support Array as argument but there are no extension functions to convert an array to persistent collections.

Example for converting an Array to a PersistentList:
fun <T> Array<out T>.toPersistentList(): PersistentList<T> = persistentListOf<T>() + this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions