From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA03651 for caml-redistribution; Wed, 9 Dec 1998 10:09:26 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA08123 for ; Tue, 8 Dec 1998 20:51:33 +0100 (MET) Received: from mail5.microsoft.com (mail5.microsoft.com [131.107.3.121]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA12171 for ; Tue, 8 Dec 1998 20:51:30 +0100 (MET) Received: by INET-IMC-05 with Internet Mail Service (5.5.2232.9) id ; Tue, 8 Dec 1998 11:51:30 -0800 Message-ID: <39ADCF833E74D111A2D700805F1951EF0B2EF6A6@RED-MSG-06> From: Don Syme To: "'akay@sharp.co.uk'" , caml-list@inria.fr Subject: RE: Functional composition operator? Date: Tue, 8 Dec 1998 11:51:25 -0800 X-Mailer: Internet Mail Service (5.5.2232.9) Sender: weis Yes, I chose the same operator, which seems very natural. Don > > is there a consensus for choice of infix composition operator? > > In the end we settled on >> and << for forward and reverse > composition respectively, satisfying the equations: > > (f << g) x = f (g x) = (g >> f) x > > The chevrons give a nice feeling of a data pipeline running from g > to f in each case. Since composition is associative (in the absence > of side effects) we can write (f << g << h << i), which is > more elegant > than (compose (compose (compose f g) h) i), without fear of being > misunderstood.