PreviousUpNext

Red-Black Trees: Dropping Key-Value Pairs

We might want to drop one key-value pair from it:

    linux$ my
    eval:  include package   string_map;
    eval:  m = empty: Map( String );
    eval:  m $= ("Key1", "Value1");
    eval:  m $= ("Key2", "Value2");
    eval:  m $= ("Key3", "Value3");

    eval:  keyvals_list m;

    [("Key1", "Value1"), ("Key2", "Value2"), ("Key3", "Value3")]

    eval:  my (m,_) = drop (m, "Key2");

    eval:  keyvals_list m;

    [("Key1", "Value1"), ("Key3", "Value3")]

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext