From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id A4619BC57 for ; Tue, 16 Nov 2010 15:19:46 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhcCACsh4kxKfVM0k2dsb2JhbACDSJ8PCBUBAQEBCQkKCREDH6RNiSY8ghiFEC6IWQEBAwWBHYM2cwSKWA X-IronPort-AV: E=Sophos;i="4.59,206,1288566000"; d="scan'208";a="78345087" Received: from mail-gw0-f52.google.com ([74.125.83.52]) by mail4-smtp-sop.national.inria.fr with ESMTP; 16 Nov 2010 15:19:45 +0100 Received: by gwj22 with SMTP id 22so312449gwj.39 for ; Tue, 16 Nov 2010 06:19:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=0RHcxMfW00rtCVyPAUE8fNSZ9xzv1YfO0uyOxUr9H9c=; b=IIP97og8QxvcS/cG9Hzh8S1aw1H7qioSmIKVI85GxPQo1nr7R7ES5VFTWmeLi5YEGL XcX2KNl/DOge/xy1tCeleNF9uCfyS1djsLL0k7WZZwiHEEWh04PWBk3q0xl2FQcxpGbc SlF02WboLL6Wfv+TI7oj6wljHYOdmlz4bLYxs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gQfDvpVY4DRMWh+PLCkQyU0jzTXGeXsXAE0QzGeM4zdAOxfVBwltKMKsdqADy0Y0hb aQ8+xV7zswUJAxPolSfO87G4kPVpCsbBPzsl89yGsuEYuUT4Z+WDa/l5C6CPRZTvLDMo vwavwRZrki607rubQO985ujWBB4VJS98VqO7g= MIME-Version: 1.0 Received: by 10.150.191.8 with SMTP id o8mr11813855ybf.264.1289917183466; Tue, 16 Nov 2010 06:19:43 -0800 (PST) Received: by 10.151.158.9 with HTTP; Tue, 16 Nov 2010 06:19:43 -0800 (PST) In-Reply-To: References: <97D1DAE6-9E21-4A87-87FC-72B3BCF2F071@gmail.com> Date: Tue, 16 Nov 2010 16:19:43 +0200 Message-ID: Subject: Re: [Caml-list] Option functions (or lack thereof) + operator for composition From: dmitry grebeniuk To: Serge Le Huitouze Content-Type: text/plain; charset=UTF-8 X-Spam: no; 0.00; grebeniuk:01 ocaml's:01 jocaml:01 infix:01 ocaml:01 ocaml:01 precedence:01 defines:01 dmitry:01 caml-list:01 functions:01 redefine:03 seems:03 ops:03 ops:03 Hello. > So I have to learn the precedence and associaticity table in section 6.7 of > OCaml's reference manual!!! I usually redefine (&) operator: let ( & ) f x = f x It's ok until you don't use JoCaml which defines keyword "&". Also take a look at other infix operators I use, maybe you found them useful too: http://bitbucket.org/gds/ops/src/tip/ops.ml (comments are in russian and in OCaml, I'll translate russian text to english at first request, it's not hard for me, but it seems that OCaml code in comments describes the usage well enough).