From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 33B857F7AF for ; Sun, 11 Oct 2015 03:31:26 +0200 (CEST) IronPort-PHdr: 9a23:x4qZMBbQBJbXxJ+YfaO4Jtz/LSx+4OfEezUN459isYplN5qZpMy5bnLW6fgltlLVR4KTs6sC0LqK9f+xEjZYsN6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDuvcKCKF8Q1XKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGY2zRakzTKRZATI6KCh1oZSz7ViQezCS/WMRWXk6lR9BAg6NrE2rH8S5jiyvk+NnxCicdeH7aL0wXTPqu6JiUgPpjisKMjM99Gb/hcl5jaYdqxWk8U9R2YnRNbCSKPN7NonUZ9UdVCIVT8FNXilLC5m6aJonAO8IPOIepI748Qhd5SCiDBWhUbu8ggRDgWX7iOhniuk= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=yotambarnoy@gmail.com; spf=Pass smtp.mailfrom=yotambarnoy@gmail.com; spf=None smtp.helo=postmaster@mail-yk0-f181.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.160.181; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.160.181 as permitted sender) identity=mailfrom; client-ip=209.85.160.181; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yk0-f181.google.com) identity=helo; client-ip=209.85.160.181; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-yk0-f181.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CgAwAnuxlWm7WgVdFeg0U1bgasNCuSbCOCcIIKfwKBFgc8EAEBAQEBAQEBEAEBAQEBBgsLCSEugh+CCAEBBBIRBBkBGxILAQMBCwYFBAcNDR0CAiEBAREBBQEKEgYTEhCHdgEDEg2hZoExPjGLSYFsgnmIdQoZJwMKVoRLAQEBAQEBAQMBAQEBAQEBARQBBQ6GZYR+glCCOQQHgmmBRQWGAwyQBIUZhg2BdIIgkhqFfRIjgRcRJ4IvI4F3IjMBh2kBAQE X-IPAS-Result: A0CgAwAnuxlWm7WgVdFeg0U1bgasNCuSbCOCcIIKfwKBFgc8EAEBAQEBAQEBEAEBAQEBBgsLCSEugh+CCAEBBBIRBBkBGxILAQMBCwYFBAcNDR0CAiEBAREBBQEKEgYTEhCHdgEDEg2hZoExPjGLSYFsgnmIdQoZJwMKVoRLAQEBAQEBAQMBAQEBAQEBARQBBQ6GZYR+glCCOQQHgmmBRQWGAwyQBIUZhg2BdIIgkhqFfRIjgRcRJ4IvI4F3IjMBh2kBAQE X-IronPort-AV: E=Sophos;i="5.17,665,1437429600"; d="scan'208";a="182126319" Received: from mail-yk0-f181.google.com ([209.85.160.181]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Oct 2015 03:31:25 +0200 Received: by ykft14 with SMTP id t14so109818552ykf.0 for ; Sat, 10 Oct 2015 18:31:23 -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=60uokxEwyM8XRF4pzSyj+PZAsBD/T/PTiGkPZOStoDs=; b=EU1o7P/g7AdLuRR4BLgD6OlOrrGgRuVHcx37B3PoucWiYY3vhAe3UxgAZQgrzE1rGp gJs1R2+dGIvzjmmkILg/SxnXYTX/DtskErs4up864FqbrcW4t+b4p2Lgnrr/qyoN8ZzY vpKRf1/emNm0IE3c2KmOQn44p1S/GvrPnCJzqH0fMvyDPUdyahG1ND41puC0UlOxGUx9 KAgJLZMcfad41YBSskzsaa4ZgWvZNLIIphy1Q597Nm/xMJ5EN6jKKHlvV0EwYr/1McCE w98skST3msxYvjgkjwL4RcnCQOnwPKMmmPC+OxuqeruZFnEBZf6jmGNGASemGzMxvYZ5 ddeA== X-Received: by 10.13.246.67 with SMTP id g64mr16733604ywf.211.1444527083892; Sat, 10 Oct 2015 18:31:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.224.203 with HTTP; Sat, 10 Oct 2015 18:31:04 -0700 (PDT) In-Reply-To: References: From: Yotam Barnoy Date: Sat, 10 Oct 2015 21:31:04 -0400 Message-ID: To: Martin DeMello Cc: Nils Becker , "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=94eb2c036078b438d60521ca2b09 Subject: Re: [Caml-list] pipe input short syntax idea --94eb2c036078b438d60521ca2b09 Content-Type: text/plain; charset=UTF-8 Interesting, but seems like overkill to me personally. I'm ok with @@ and |> (which already breaks F#'s convention, since @@ would be <| in F#. What's the reason we went with @@ instead again?). Function composition is potentially more confusing, and I think keeping it with a consistent associativity direction (that being the direction of normal function application from right to left) has value. So I'm personally sort-of ok with <<, but once you suggest something as beautifully concise as o, I'm overwhelmed by the convenience factor. On Sat, Oct 10, 2015 at 9:09 PM, Martin DeMello wrote: > F# defines composition operators >> and <<: > > http://theburningmonk.com/2011/09/fsharp-pipe-forward-and-pipe-backward/ > > martin > > On Sat, Oct 10, 2015 at 6:52 AM, Nils Becker < > nils.becker@bioquant.uni-heidelberg.de> wrote: > >> 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 >> > > --94eb2c036078b438d60521ca2b09 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Interesting, but seems like overkill to me personally. I&#= 39;m ok with @@ and |> (which already breaks F#'s convention, since = @@ would be <| in F#. What's the reason we went with @@ instead agai= n?). Function composition is potentially more confusing, and I think keepin= g it with a consistent associativity direction (that being the direction of= normal function application from right to left) has value. So I'm pers= onally sort-of ok with <<, but once you suggest something as beautifu= lly concise as o, I'm overwhelmed by the convenience factor.

On Sat, Oct 10, 2015 a= t 9:09 PM, Martin DeMello <martindemello@gmail.com> wr= ote:
F# defines composit= ion operators >> and <<:


ma= rtin

On Sat, Oct 10, 2015 a= t 6:52 AM, Nils Becker <nils.becker@bioquant.uni-heid= elberg.de> wrote:
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


--94eb2c036078b438d60521ca2b09--