Neil Mitchell wrote: > Sounds like a bidirectional Map to me - fortunately hackage already > has one of these: > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bimap Yes, bimap is even better. Save lots of work.