タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

CategoryとLensに関するnotaeのブックマーク (2)

  • From Lenses to Yoneda Embedding

    From Lenses to Yoneda Embedding Posted by Bartosz Milewski under Category Theory, Functional Programming, Haskell, Lens, Programming [6] Comments Lenses are a fascinating subject. Edward Kmett’s lens library is an indispensable tool in every Haskell programmer’s toolbox. I set out to write this blog post with the goal of describing some new insights into their categorical interpretation, but then

    From Lenses to Yoneda Embedding
  • Lensで行こう!(2):Isoへの拡張 - Just $ A sandbox

    このエントリーはLensで行こう! - みょんさんの。の続編にあたります。 前回の復習 前回、Lens型について詳しく見ました。 Lens型は以下のような型のデータです。 type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t これはFuctorを上手く定めてやれば(ConstとIdentityでしたね!)getter,setterとして振る舞うことのできる素敵な型でした。 さて、この型がどれだけの力を持っているかを実感した方は、きっと「こんなややこしそうに見える型がどこから降ってきたのか?」という疑問が湧いてくると思います。 今回はこのことについて見ていくことにします。 Iso型とは? ではLensについて考えるのに、やはりHackageを参照しましょう→The lens package このページ真ん中に、大き

    Lensで行こう!(2):Isoへの拡張 - Just $ A sandbox
  • 1