From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id DAA23504; Thu, 26 Apr 2001 03:20:21 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA23473 for ; Thu, 26 Apr 2001 03:20:20 +0200 (MET DST) Received: from staff.gtmd.com (adsl-63-195-80-23.dsl.snfc21.pacbell.net [63.195.80.23]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f3Q1KCX05714 for ; Thu, 26 Apr 2001 03:20:18 +0200 (MET DST) Received: from aria.chasm.org (aria [192.168.0.3]) by staff.gtmd.com (8.9.3/8.9.3) with ESMTP id SAA83986 for ; Wed, 25 Apr 2001 18:19:26 -0700 (PDT) (envelope-from charles@chasm.org) Message-Id: <5.0.2.1.0.20010425181746.0221cb20@chasm.org> X-Sender: charles@chasm.org X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Wed, 25 Apr 2001 18:22:33 -0700 To: caml-list@inria.fr From: Charles Martin Subject: Re: [Caml-list] operators: compose and Haskell's $ operator In-Reply-To: References: <5.0.2.1.0.20010425164708.021928c0@chasm.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk At 05:57 PM 4/25/01 -0700, you wrote: >On Wed, 25 Apr 2001, Charles Martin wrote: >>equivalent for the $ operator eludes me, as it needs to be right >>associative and of low precedence. > ># let ( <-> ) f x = f x;; >val ( <-> ) : ('a -> 'b) -> 'a -> 'b = Unfortunately, this is left-associative: # (+) 3 <-> ( * ) 2 <-> 4;; Characters 0-5: This expression has type int -> int but is here used with type (int -> int) -> 'a ...and higher in precedence than logical operators: # not <-> true && false;; - : bool = false The expression table (http://caml.inria.fr/ocaml/htmlman/manual014.html) does not have an ellipsis after the "<-" entry, so I assume that "<->" gets lumped into the "other infix symbols" category, which is left associative (and higher precedence than the logical operators). ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr