Skip to content

add a Map.put(key: A, value: B): Option[B] #26

@performantdata

Description

@performantdata

In analogy with mutable.Map. Otherwise one has to search twice, with

val old = m.get(k)
m.update(k, v)
old

which, admittedly, is what MapLike does but isn't efficient.

I can PR such, if you want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions