[<<][haskell][>>][..]
Sun Jun 17 02:32:42 EDT 2018

When is Arrow appropriate?

https://www.reddit.com/r/haskell/comments/4fkkzo/when_does_one_consider_using_arrows/

Come up with some other examples?

A function and its inverse?

data InvFun a b = InvFun (a->b) (b->a)
https://hackage.haskell.org/package/invertible

Not an arrow, because "arr" doesn't have an implementation.

Kmett:

  Arrow is primarily used when one has failed to discover
  Applicative. One of the primary motivations for them was to find a
  way to model Swiestra and Duponcheel's parser for LL(1)
  grammars... which actually makes a much better Applicative than an
  Arrow.

  The main usecase I have for importing Control.Arrow these days is
  when I want to call (&&&), not to define instances.

EDIT 7/21:

Kmett:

  class (Strong p, Category p) => Arrow p
  instance (Strong p, Category p) => Arrow p

See 7/21



[Reply][About]
[<<][haskell][>>][..]