OCaml infix function-composition

From: Andrew Kay (akay@sharp.co.uk)
Date: Fri Oct 02 1998 - 12:26:34 MET DST


Date: Fri, 2 Oct 1998 11:26:34 +0100
From: akay@sharp.co.uk (Andrew Kay)
Message-Id: <199810021026.LAA27738@byrd.sharp.co.uk>
To: caml-list@inria.fr
Subject: OCaml infix function-composition

Dear caml-list,

We are in the process of converting our Caml code into OCaml, and
have a problem choosing an infix syntax for function composition
(right to left, as in (fun f g x -> f (g x))). Previously we used "o"
for this, but I believe we cannot make "o" an infix operator in
OCaml, nor ".", which was our second choice. We are considering "<<"
and "$" now.

What do other OCaml people use for function composition? Is there a
standard emerging? If we choose an operator, how can we be sure that
our selection won't be upset by the next version of OCaml?

Thanks

Andrew Kay

Sharp Labs Europe Ltd, Oxford Science Park, Oxford, UK, OX4 4GA
Andrew.Kay@sharp.co.uk Tel:+44 1865 747711 FAX:+44 1865 747717



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:16 MET