ekmett先生のlensに関して Lens'は便利に使えはするけど、Prism,Iso,Traversal,Foldみたいなのは触ったことがなかったので調べた。 Lensの利用 1 import Control.Lens して 1 2 3 4 5 6 >>> ("hello",("world","!!!")) ^. _2 . _1 "world" >>> ("hello",("world","!!!")) & _2 . _1 .~ 42 ("hello",(42,"!!!")) >>> ("hello",("world","!!!")) & _2 . _1 %~ map toUpper ("hello",("WORLD","!!!")) みたいに使う。優先順位は以下のようになっている: 1 2 3 >>> ("hello",("world","!!!")) ^. (_2 . _1) >>
![Haskellのlensの使い方 (基本) - みゆっきのにっき](https://cdn-ak-scissors.b.st-hatena.com/image/square/1a4bd38d2eb421043e8887634632281712a1c91e/height=288;version=1;width=512/http%3A%2F%2Fsolorab.net%2Fblog%2F2014%2F12%2F14%2Fhow-to-use-lens-a%2Fhierarchy.png)