There's a good chance you have already used contramap (e.g. when creating a Circe encoder), but understanding the concept can be challenging. This article explains it using a practical example. #scala 

Understanding Contramap