If I've got a table for which I know (by construction) the keys and values are 
unique, is there a more elegant way to "invert" the table than below?
    
    
    import tables, sequtils
    
    var int2str = {0: "Zero", 1: "One", 2: "Two", 3: "Three"}.toTable
    var str2int = newTable(zip(toSeq(int2str.values), toSeq(int2str.keys)))
    
    
    
    Run

Reply via email to