Remix.run Logo
▲ crabmusket a day ago

This gives me the same feeling as when I saw Rust's map Entry API

https://doc.rust-lang.org/std/collections/hash_map/enum.Entr...

    let mut map: HashMap<&str, u32> = HashMap::new();
    map.entry("poneyland").or_insert(3);
    assert_eq!(map["poneyland"], 3);
It's very ergonomic.