PreviousUpNext

Red-Black Trees: Map

We might want to transform all the values in a map:

    linux$ my

    eval:  include package   string_map;

    eval:  m = empty: Map( Int );

    eval:  m $= ("Key1", 1);
    eval:  m $= ("Key2", 2);
    eval:  m $= ("Key3", 3);

    eval:  m = map (sprintf "<<%d>>") m;

    eval:  keyvals_list m;
    [("Key1", "<<1>>"), ("Key2", "<<2>>"), ("Key3", "<<3>>")]

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext