From: Jean-Christophe Filliatre <filliatr@lri.fr>
To: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
Cc: "'EEK Cooper'" <s0567141@sms.ed.ac.uk>, caml-list@yquem.inria.fr
Subject: Re: AW: [Caml-list] Map.fold behavior changed
Date: Fri, 24 Feb 2006 12:39:02 +0100 [thread overview]
Message-ID: <17406.61526.236550.40544@gargle.gargle.HOWL> (raw)
In-Reply-To: <26EB47FDD566A7469FC862DAF373792F07D7AE@kaiserslautern1.lmsintl.com>
Bauer, Christoph writes:
> What about to provide a "fold_left" (= new version) and "fold_right"
> (= old version)? Fixing old programs would be simple. Combined with
> exceptions there would be a fast solution (O(1) instead of O(n))
> to find a minimum and maximum key from a large map.
It would be O(log(n)), not O(1), since you still need to descend to
the leftmost (resp. rightmost) element in a binary search tree to find
the minimum (resp. maximum) element.
--
Jean-Christophe Filliâtre (http://www.lri.fr/~filliatr)
prev parent reply other threads:[~2006-02-24 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-24 11:34 Bauer, Christoph
2006-02-24 11:39 ` Jean-Christophe Filliatre [this message]
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=17406.61526.236550.40544@gargle.gargle.HOWL \
--to=filliatr@lri.fr \
--cc=Christoph.Bauer@lms-gmbh.de \
--cc=caml-list@yquem.inria.fr \
--cc=s0567141@sms.ed.ac.uk \
/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