From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id TAA02171 for caml-redistribution; Mon, 16 Oct 1995 19:20:29 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id KAA02622 for ; Sun, 15 Oct 1995 10:40:03 +0100 Received: from margaux.inria.fr (margaux.inria.fr [128.93.8.2]) by concorde.inria.fr (8.6.10/8.6.9) with ESMTP id KAA27425 for ; Sun, 15 Oct 1995 10:39:58 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by margaux.inria.fr (8.6.10/8.6.6) with ESMTP id KAA00986 for ; Sun, 15 Oct 1995 10:39:57 +0100 Received: from logatome.micronet.fr (root@logatome.micronet.fr [194.51.75.1]) by concorde.inria.fr (8.6.10/8.6.9) with ESMTP id KAA27421 for ; Sun, 15 Oct 1995 10:39:57 +0100 Received: from [194.51.75.144] (ppp12.micronet.fr [194.51.75.144]) by logatome.micronet.fr (8.6.9/8.6.9) with SMTP id KAA20424 for ; Sun, 15 Oct 1995 10:39:52 +0100 Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Sun, 15 Oct 1995 10:41:14 +0200 To: caml-list@margaux.inria.fr From: cheno@micronet.fr (Laurent CHENO) Subject: streams and lazy evaluation Sender: weis I have obtained: > Caml Light version 0.7mac #let rec from n =3D [< 'n ; from (n+1) >] ;; from : int -> int stream =3D #let rec version1 flot =3D match flot with [< 'n >] -> [< '(2*n) ; version1 flot >] ;; version1 : int stream -> int stream =3D #version1 (from 0) ;; - : int stream =3D #let rec version2 flot =3D match flot with [< 'n ; version2 reste >] -> [< '(2*n) ; reste >] ;; version2 : int stream -> int stream =3D #version2 (from 0) ;; Uncaught exception: Out_of_memory # Why ?? Thank's for the answer. ------------------------------------------------------------------- Laurent CHENO teaching at / enseignant au Lyc=E9e Louis-le-Grand - 123 rue Saint-Jacques 75231 PARIS CEDEX 05 - FRANCE personal phone (33) 1 48 05 16 04 - fax (33) 1 48 07 80 18 -------------------------------------------------------------------