Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

AndModify

func AndModify(transform: (V) -> V) -> MapEntry<K, V>

Declaring type: MapEntry<K, V>
Module: System.Collections
Assembly: System.Runtime.dll
Source file: MapEntry.rvn

Transforms a present value once and writes back the result.

Parameters

Name Type Description
transform Function A synchronous replacement callback; skipped when absent.

Return value

MapEntry<K, V>

This reusable locator, including when absent.

Remarks

The returned value wins over callback writes, and recreates a key removed by the callback on maps supporting removal. A callback fault prevents this helper's write; reference mutations and other callback effects remain. Chained calls independently resolve current state.