Open yogurtearl opened 1 year ago
Add buildPersistentList { }, buildPersistentMap { }, buildPersistentSet { } to match the collection builders in kotlin stdlib
buildPersistentList { }
buildPersistentMap { }
buildPersistentSet { }
I would imagine it would look something like this:
fun <E> buildPersistentList(block: PersistentList.Builder<E>.() -> Unit): PersistentList<E> = persistentListOf<E>().builder().apply(block).build()
I think it's a good idea but it should be inlined because otherwise it doesn't work at @Composable functions.
@Composable
Addressing the fix to #166, can you take a review?
Add
buildPersistentList { }
,buildPersistentMap { }
,buildPersistentSet { }
to match the collection builders in kotlin stdlibI would imagine it would look something like this: