From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA02559; Fri, 20 Jul 2001 10:06:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA02550 for ; Fri, 20 Jul 2001 10:06:26 +0200 (MET DST) Received: from snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6K86OP18072; Fri, 20 Jul 2001 10:06:24 +0200 (MET DST) Received: from checkerlap.d6.com ([64.160.52.30]) by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GGR00JEAII9YW@mta5.snfc21.pbi.net>; Fri, 20 Jul 2001 01:06:10 -0700 (PDT) Date: Fri, 20 Jul 2001 00:49:17 -0700 From: Chris Hecker Subject: Re: [Caml-list] Generation of streams is slow In-reply-to: <20010714103110.A26003@verdot.inria.fr> X-Sender: def6@shell16.ba.best.com To: Daniel de Rauglaudre , "Alexander V. Voinov" Cc: "caml-list@inria.fr" Message-id: <4.3.2.7.2.20010720004629.03e9a100@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: <3B4FC748.F9E14008@quasar.ipa.nw.ru> <3B4F70D7.82E58A91@quasar.ipa.nw.ru> <20010714042701.A24266@verdot.inria.fr> <3B4FB39D.10D1F6D5@quasar.ipa.nw.ru> <20010714060417.A25766@verdot.inria.fr> <3B4FC748.F9E14008@quasar.ipa.nw.ru> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >A way to avoid that (I mean creation of a reversed list and reversion) >is to use mutable types, what the list type is not. Has anybody written a simple "circular linked list" implementation in ocaml? Basically, you'd want it to act exactly like the built in lists, but appends and finding the tail elemeent are O(1). It doesn't seem possible to make this as convenient as the built in list, since :: doesn't seem to be redefinable, and I don't know how you'd make this work in pattern matching. Is there any work on making user defined abstract types work in pattern matching? Chris ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr