Actually sorted maps can do that

..