On Fri, 8 Oct 1999, Joe English wrote:
> Along the same lines, are there accepted conventional infix operators
> for the functions with types:
>
> (a0 -> b0) -> (a1 -> b1) -> (a0,a1) -> (b0,b1)
> (a -> b0) -> (a -> b1) -> a -> (b0,b1))
>
> (a0 -> b0) -> (a1 -> b1) -> Either a0 a1 -> Either b0 b1
> (a0 -> b) -> (a1 -> b) -> Either a0 a1 -> b
>
> (the last one is called "either" in the standard Prelude).
>
> I personally like:
>
> (f <*> g) (x,y) = (f x, g y)
> (f <&> g) x = (f x, g x)
> (f <+> g) (Left x) = Left (f x)
> (f <+> g) (Right y) = Right (g y)
> (f <|> g) (Left x) = f x
> (f <|> g) (Right y) = g y
>
I personally use $*$ (application on both sides of product), /\ (split) and
dually $+$ and \/ (for join). The split and join notations correspond
quite nicely to the categorical notation. The symbols <*> and <|> are used
in the parsing combinator library I use quite heavily (the Utrecht
version). And I'm sure everybody has a pet choice of operator-names and
libraries, so I think this debate could be endless. Just looking through
the standard hugs-libraries shows up that <+> and $+$ both are used in John
Hughes's and SPJ's pretty-printing library...
Cheers,
Jan de Wit