O'Reilly logo

Haskell Cookbook by Yogesh Sajanikar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

Iso represent an isomorphic lens. It represents a bidirectional lens. So, if you can use Iso compress to convert from ByteString to a compressed ByteString, then you can use from compress to convert compressed ByteString back to original Bytestring. An Iso is also a lens, and it is possible to combine it with other lenses as we have done in the case of compress.

Isos are more convenient if we often convert between different string types (text, bytestring, and String).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required