0
.        ProFunctor and Arrow        – profunctors hackage library –.    Kei Hibino : http://twitter.com/khibino          ...
Functor  Functor f = > f b  Functor ( a - >) = > ( a - >) b    --- 終域だけ - only co - domain  fmap :: ( a -> b ) -> f a -> f...
Arrow  Arrow   a => a b c  Arrow   ( - >) = > ( - >) b c     ---  始域と終域が両方ある     ---  both domain and co - domain  (^ > >)...
ProFunctor  ProFunctor p = > p a b    --- 始域と終域が両方ある    --- both domain and co - domain  lmap :: ProFunctor p = >         ...
Strong type class in profunctors  first ’ :: p a b -> p (a , c ) (b , c )  second ’ :: p a b -> p (c , a ) (c , b )  Arrow...
Choice type class in profunctors  left ’  :: p   a b ->             p   ( Either a c ) ( Either b c )  right ’ :: p   a b ...
Conclusion  ProFunctor は Arrow の制約を分割して提供してい  るイメージ                        .   .   .   .   .   .
Upcoming SlideShare
Loading in...5
×

Profunctor and Arrow

932

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
932
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "Profunctor and Arrow"

  1. 1. . ProFunctor and Arrow – profunctors hackage library –. Kei Hibino : http://twitter.com/khibino 2013-03-31 . . . . . .
  2. 2. Functor Functor f = > f b Functor ( a - >) = > ( a - >) b --- 終域だけ - only co - domain fmap :: ( a -> b ) -> f a -> f b --- 終域を変える - map co - domain . . . . . .
  3. 3. Arrow Arrow a => a b c Arrow ( - >) = > ( - >) b c --- 始域と終域が両方ある --- both domain and co - domain (^ > >) :: Arrow a = > ( b -> c ) -> a c d -> a b d ^ ^ --- 始域を変える - map domain (^ < <) :: Arrow a = > ( c -> d ) -> a b c -> a b d ^ ^ --- 終域を変える - map co - domain . . . . . .
  4. 4. ProFunctor ProFunctor p = > p a b --- 始域と終域が両方ある --- both domain and co - domain lmap :: ProFunctor p = > ( b -> c ) -> p c d -> p b d ^ ^ --- 始域を変える - map domain rmap :: ProFunctor p = > ( b -> c ) -> p a b -> p a c ^ ^ --- 終域を変える - map co - domain . . . . . .
  5. 5. Strong type class in profunctors first ’ :: p a b -> p (a , c ) (b , c ) second ’ :: p a b -> p (c , a ) (c , b ) Arrow ( first , second ) . . . . . .
  6. 6. Choice type class in profunctors left ’ :: p a b -> p ( Either a c ) ( Either b c ) right ’ :: p a b -> p ( Either c a ) ( Either c b ) ArrowChoice ( left , right ) . . . . . .
  7. 7. Conclusion ProFunctor は Arrow の制約を分割して提供してい るイメージ . . . . . .
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×