BiMaps.jl is a pakcage for bijective mapping.
using BiMaps
bimap = BiMap{Int,String}()
bimap.left[1] = "one"
bimap.left[2] = "two"
bimap.right["three"] = 3
@assert bimap.left[1] == "one"
@assert bimap.right["two"] == 2
@assert bimap.left[3] == "three"