caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: Lukasz Stafiniak <lukstafi@gmail.com>, Caml <caml-list@inria.fr>,
	"batteries-discuss@lists.forge.ocamlcore.org"
	<batteries-discuss@lists.forge.ocamlcore.org>
Subject: Re: [Caml-list] Operator for Lazy.force?
Date: Wed, 30 Oct 2013 14:07:57 -0700 (PDT)	[thread overview]
Message-ID: <1383167277.75943.YahooMailNeo@web120402.mail.ne1.yahoo.com> (raw)
In-Reply-To: <CAJMfKEXbT=g4Ha9=p3aaFtMqAbuhzuYFi5ff8DsrRS6D7hsRyg@mail.gmail.com>

Hi,

> Shouldn't we have, in standard libraries, a prefix operator for forcing lazy values,
> comparable to `!` for reference cells and `.!` for MetaOCaml's "run"?

Indeed, the following operator definition is pretty common on OCaml code in the wild:

let (!!) = Lazy.force

However, I'm not sure it should be part of a standard library.  There are projects which
do not use Lazy, and instead define the (!!) operator to be something else convenient
for whatever task they perform.

Best regards,
Dario Teixeira

  reply	other threads:[~2013-10-30 21:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 18:51 Lukasz Stafiniak
2013-10-30 21:07 ` Dario Teixeira [this message]
2013-10-30 21:33   ` Dmitry Grebeniuk
2013-10-31 11:10     ` Dario Teixeira
2013-11-01 15:49     ` Damien Doligez
2013-11-02 19:03       ` David Allsopp

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=1383167277.75943.YahooMailNeo@web120402.mail.ne1.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=batteries-discuss@lists.forge.ocamlcore.org \
    --cc=caml-list@inria.fr \
    --cc=lukstafi@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).