From: osiire@k8.dion.ne.jp
To: caml-list@inria.fr
Subject: Re: [Caml-list] right-associating infix application operator camlp4 extension
Date: Wed, 10 Aug 2005 15:21:56 +0900 [thread overview]
Message-ID: <873bpi2tx7.wl%osiire@k8.dion.ne.jp> (raw)
In-Reply-To: <7B0AADBE-23D8-4C63-ABE7-75360C874E13@lrde.epita.fr>
Hi.
On Sat, 6 Aug 2005 16:03:55 -0700
In <7B0AADBE-23D8-4C63-ABE7-75360C874E13@lrde.epita.fr>
Quôc Peyrot <chojin@lrde.epita.fr> wrote:
> Is there any existing camlp4 extensions to define a $ haskell-like
> operator?
Maybe "@" and "^" are right-associated.
# let ( ^$ ) f x = f x;;
val ( ^$ ) : ('a -> 'b) -> 'a -> 'b = <fun>
# print_string ^$ List.fold_left (fun x sum -> sum ^ x) "" ^$ ["1";"2";"3"];;
321- : unit = ()
# let ( @$ ) f x = f x;;
val ( @$ ) : ('a -> 'b) -> 'a -> 'b = <fun>
# print_string @$ List.fold_left (fun x sum -> sum ^ x) "" @$ ["1";"2";"3"];;
321- : unit = ()
---
osiire
next prev parent reply other threads:[~2005-08-10 6:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-06 23:03 Quôc Peyrot
2005-08-07 8:23 ` [Caml-list] " Christian Lindig
2005-08-10 6:21 ` osiire [this message]
2005-08-10 7:38 ` Jean-Marie Gaillourdet
2005-08-10 7:50 ` David MENTRE
2005-08-11 3:04 ` Quôc Peyrot
2005-08-11 4:50 ` Stephane Glondu
2005-08-11 10:41 ` Christian Lindig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873bpi2tx7.wl%osiire@k8.dion.ne.jp \
--to=osiire@k8.dion.ne.jp \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox