scala utilities (twitter bijection)