Skip to content

No orEmpty function for ImmutableList? #182

Open
@Abhimanyu14

Description

@Abhimanyu14

Can we add an extension function similar to List for ImmutableList?

@kotlin.internal.InlineOnly
public inline fun <T> ImmutableList<T>?.orEmpty(): ImmutableList<T> = this ?: persistentListOf()

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