Add extension functions to convert Array to persistent collections
Closed this issue · 0 comments
SageDroid commented
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