Skip to main content

set

Function set 

Source
pub fn set(map: &Expr, name: &str, value: Expr) -> Expr
Expand description

Set (or insert) a visible field by name, matching either a bare-symbol or string key, preserving sibling keys in a new map value.

When duplicates exist under the same visible name, the first matching entry keeps its original key spelling and later duplicates are dropped.