FIND YOUR NEXT FEW LINES
Results for “mutable”
Small, practical examples. Search by task or narrow things down below.
19 snippets foundClear filters
Share immutable data with Arc
Share immutable data with Arc in a complete Rust program using the standard library.
Rust✓ Tested
Take an immutable list snapshot
Java: List.copyOf protects the snapshot from later changes to the source list.
Java✓ Tested
Update a JSON document with mutable nodes
C#: JsonNode permits targeted changes before serializing a document again.
C#✓ Tested
Update an explicitly mutable variable
Update an explicitly mutable variable in a complete Rust program using the standard library.
Rust✓ Tested
Update an object with a readonly input
Create a changed copy while retaining the original.
readonly✓ Tested
Remove collection items that satisfy a condition
Java: Use removeIf on a mutable collection to avoid changing it manually inside a for-each loop.
Java✓ Tested
Sort a list
Sort a mutable Java list in natural ascending order.
Java✓ Tested