A function with a left inverse is a powerful way to think about a parser/serializer pair.