kleisli arrows

4 views
Skip to first unread message

Francesco Lazzarino

unread,
Jul 31, 2012, 10:37:43 PM7/31/12
to gainesvil...@googlegroups.com

count w = Kleisli readFile >>>
               arr words >>> arr (filter (==w)) >>> arr length >>>
               Kleisli print

I get that Kleisli (f::a -> m b) makes an Monad m => Kleisli m a b which is an instance of Arrow, and that a b c >>> a c d means a b d.

just making sure i'm getting all the parts:
  • arr words without a context has no concrete type beyond Arrow a => a [String] (is concrete type the correct term?)
  • given the context of Kleisli readFile >> arr words, the type system knows that arr words :: Kleisli IO String [String]
are both points true and complete?

thanks guys,

-franco

Reply all
Reply to author
Forward
0 new messages