Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buildPersistentList { }, buildPersistentMap { }, buildPersistentSet { } to match the builders in kotlin stdlib #137

Open
yogurtearl opened this issue Dec 13, 2022 · 2 comments · May be fixed by #166

Comments

@yogurtearl
Copy link

yogurtearl commented Dec 13, 2022

Add buildPersistentList { }, buildPersistentMap { }, buildPersistentSet { } to match the collection builders in kotlin stdlib

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() 
@Shusek
Copy link

Shusek commented Mar 8, 2023

I think it's a good idea but it should be inlined because otherwise it doesn't work at @Composable functions.

@Goooler Goooler linked a pull request Dec 29, 2023 that will close this issue
@Goooler
Copy link
Contributor

Goooler commented Dec 30, 2023

Addressing the fix to #166, can you take a review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants