From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 69F9D7FC6B for ; Sun, 11 Oct 2015 02:20:07 +0200 (CEST) IronPort-PHdr: 9a23:5evp2BbfkdfzqvzLdGyFyUr/LSx+4OfEezUN459isYplN5qZpcW5bnLW6fgltlLVR4KTs6sC0LqK9f+xEjVRvd6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDuvcKCKFwZ2HKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGY2zRakzTKRZATI6KCh1oZSz7ViQezCS/WMRWXk6lR9BAg6NrE2rH8S5jiyvseFh0SKaJ8rwBeQzUiirx79sTA7jiCAdMDh//nuB2eJqi6cOkRW9rhk36YfOZoaEfK5veb/UeNkTX2xGT+5eUiVABsW3aI5ZXLlJBvpRs4So/whGlhC5HwT5Qb62xw== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=yotambarnoy@gmail.com; spf=Pass smtp.mailfrom=yotambarnoy@gmail.com; spf=None smtp.helo=postmaster@mail-yk0-f176.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.160.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.160.176 as permitted sender) identity=mailfrom; client-ip=209.85.160.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yk0-f176.google.com) identity=helo; client-ip=209.85.160.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-yk0-f176.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CYAwC9qhlWm7CgVdFeg0U1bgasNIUljBiBWiGCcoIKfwKBFgc6EgEBAQEBAQEBEAEBAQEBBgsLCSEugh+CCAEBAwESEQQZARsSCwEDAQsGBQQHGh0CAiIBEQEFAQoSBhMSEId2AQMKCA2hbIExPjGLSYFsgnmIdwoZJwMKVoRLAQEBAQEBAQMBAQEBAQEBARQBBQ6GZYR+hQkEB4JpgUUFhgMMhn6JBoUZiAGCIJgXEiOBFxEXC4I0I4F3IjOHagEBAQ X-IPAS-Result: A0CYAwC9qhlWm7CgVdFeg0U1bgasNIUljBiBWiGCcoIKfwKBFgc6EgEBAQEBAQEBEAEBAQEBBgsLCSEugh+CCAEBAwESEQQZARsSCwEDAQsGBQQHGh0CAiIBEQEFAQoSBhMSEId2AQMKCA2hbIExPjGLSYFsgnmIdwoZJwMKVoRLAQEBAQEBAQMBAQEBAQEBARQBBQ6GZYR+hQkEB4JpgUUFhgMMhn6JBoUZiAGCIJgXEiOBFxEXC4I0I4F3IjOHagEBAQ X-IronPort-AV: E=Sophos;i="5.17,665,1437429600"; d="scan'208";a="150174663" Received: from mail-yk0-f176.google.com ([209.85.160.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Oct 2015 02:20:06 +0200 Received: by ykft14 with SMTP id t14so109194208ykf.0 for ; Sat, 10 Oct 2015 17:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=s4YzAMpp47YHQ9nnw77z+94b/51OXoE8W/is+Cv3Lnc=; b=sw5FUVWVZUJjEHtYtAeLZesP/McGqf6V2dQZKj9YYYLisJEjNhzL9pUsl78jLxcC2n TWB12FSx6ggQgjc7K7tTJQdWFfaOYsXeclKzalerFan3arEDCduTsxJtW6QJnia6+byb +3D6RA/ZqkuS3CpjoUHNNSHgMzC6itF+trVaY3LMYUoNIsD3JtI67qtLF75MNbw/RQAI vG3Ul2r1urvJ1RBFp+j4VgV0m8LE5ZCoXNlXVbcpUvsrlOCp++65XWu88mJNaKTTit6K HPuDvHu53KZm6pzVcaq8+GFAYFUBwbnKqvX7HkQFjIvU9LjQZk8y9Tsz3xkWBsSm/QR2 TZog== X-Received: by 10.129.70.195 with SMTP id t186mr16299026ywa.4.1444522804774; Sat, 10 Oct 2015 17:20:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.224.203 with HTTP; Sat, 10 Oct 2015 17:19:45 -0700 (PDT) In-Reply-To: <56191C97.5000003@polychoron.fr> References: <56191C97.5000003@polychoron.fr> From: Yotam Barnoy Date: Sat, 10 Oct 2015 20:19:45 -0400 Message-ID: To: octachron Cc: Ocaml Mailing List Content-Type: multipart/alternative; boundary=001a114c7f14a60f750521c92cf0 Subject: Re: [Caml-list] pipe input short syntax idea --001a114c7f14a60f750521c92cf0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I definitely agree that we need a standardized composition operator. It's so much nicer to have one in the standard library rather than having to define our own. I personally use |- but I would be open to anything of equal length. On Sat, Oct 10, 2015 at 10:11 AM, octachron wrote: > Hi, > If you just want a short notation for (fun x -> x |> f |> g |> ...), > why not simply define a composition operator? > > With > let (->-) f g x =3D x |> f |> g;; > you can rewrite the previous expression as f ->- g ->- h ... > I personally don't think that there is any need for a special syntax here. > > At the same time, it could be nice if there was a standardized name for > composition operators. > > =E2=80=94octachron. > > Le 10/10/15 15:52, Nils Becker a =C3=A9crit : > > hi, >> >> just an idea for a short notation which might be appealing: >> >> (|> f |> g |> ... ) as abbreviation for (fun x -> x |> f |> g |> ...) >> >> (|> f) would be just f. >> >> in other words a it's function composition using |> . it looks intuitive >> to me. but of course it could be a bad idea for a lot of reasons. >> >> n, >> >> >> > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a114c7f14a60f750521c92cf0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I definitely agree that we need a standardized composition= operator. It's so much nicer to have one in the standard library rathe= r than having to define our own. I personally use |- but I would be open to= anything of equal length.

On Sat, Oct 10, 2015 at 10:11 AM, octachron <octa@polych= oron.fr> wrote:
Hi,
If you just want a short notation for (fun x -> x |> f |> g |> = ...),
why not simply define a composition operator?

With
let (->-) f g x =3D=C2=A0 x |> f |> g;;
you can rewrite the previous expression as f ->- g ->- h ...
I personally don't think that there is any need for a special syntax he= re.

At the same time, it could be nice if there was a standardized name for
composition operators.

=E2=80=94octachron.

Le 10/10/15 15:52, Nils Becker a =C3=A9crit :

hi,

just an idea for a short notation which might be appealing:

(|> f |> g |> ... ) as abbreviation for (fun x -> x |> f |&g= t; g |> ...)

(|> f) would be just f.

in other words a it's function composition using |> . it looks intui= tive
to me. but of course it could be a bad idea for a lot of reasons.

n,




--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a114c7f14a60f750521c92cf0--