Skip to the content.

Lens' s a: given a type s that always has an a in it, a Lens' s a is a way of getting and setting that a inside of s
Prism' s a: given a type s that might have an a in it, a Prism' s a is a way of extracting the a if it exists, and being able to create an s given an a
Traversal' s a: target many as which may or may not exist inside of an s
Iso' s a : says that s and a are different representations of the same type
All Lenses are Traversals and all Prisms are also Traversals. Not all Traversals are Lenses or Prisms though. https://www.reddit.com/r/haskell/comments/9ded97/is_learning_how_to_use_the_lens_library_worth_it/e5hf9ai/

A prism is like a first-class pattern match
https://www.youtube.com/watch?v=GZPup5Iuaqw

チュートリアル

ライブラリ

lens

optics

prolens

generic-lens

Classy Optics

その他

圏論

Profunctor Optics