Existential Lens란걸 알게되었는데 정의는 다음과 같다

data Lens s a = forall c. Lens (s -> (c, a)) ((c, a) -> s)

돌무식 렌즈(get, set 레코드)보다는 좀더 어렵지만 Van Laarhoven Lens보다는 훨씬 더 직관적이라서 렌즈의 이해에 도움이 많이 되었다.

전체 설명은 요깄다.

7

If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/0197731d-dc8c-764e-b290-312386699bb7 on your instance and reply to it.