On  9 Oct, Heribert Schuetz wrote:

[(f <| g) x = f (g x); (f |> g) x = g (f x)]

>    "Use symmetric glyphs for commutative operations and asymmetric glyphs
>    for non-commutative operations. Reflect glyphs for flipped operations."

That would make me happy.

>  which I would suggest as a general guideline.

and I'd go along with that.

>  Similarly, I would prefer a pair of reflected symbols for normal and
>  reversed function application, e.g., <$ and $>. (Yes, these are not 100%
>  reflected, but almost.)

and that.  For the record, my taste isn't particularly bothered by
multi-character symbols; what swayed me in the past was the argument
that it was a problem for other folk.


* * *

Anyway -- I'd like to suggest that we put a library containing
definitions of simple operators of general utility somewhere readily
accessible.  The precise choice of name for operator doesn't matter
(though I think a certain amount of discussion is worthwhile).  What
matters is that for common functions such as the ones we have been
discussing the Haskell community should in general use the same names.

I'd include composition, function products (as in Joe English's
message) and operations on boolean predicates:

> (f &&& g) x = f x && g x
> (f ||| g) x = f x || g x
> notF f x = not (f x)

(I'm not wedded to those names.)

Where do we put it?



-- 
Jón Fairbairn                                 [EMAIL PROTECTED]





Reply via email to