From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA21284 for caml-redist@pauillac.inria.fr; Tue, 16 May 2000 10:21:41 +0200 (MET DST) Resent-Message-Id: <200005160821.KAA21284@pauillac.inria.fr> Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA05659 for ; Tue, 16 May 2000 00:20:59 +0200 (MET DST) Received: from sarg.Ryerson.CA (sarg.Ryerson.CA [141.117.18.117]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e4FMKwT23416 for ; Tue, 16 May 2000 00:20:58 +0200 (MET DST) Received: from sarg.Ryerson.CA (dmason@localhost [127.0.0.1]) by sarg.Ryerson.CA (8.8.7/8.8.7) with ESMTP id SAA07498 for ; Mon, 15 May 2000 18:20:44 -0400 Message-Id: <200005152220.SAA07498@sarg.Ryerson.CA> To: caml-list@inria.fr Subject: Re: reference initialization In-reply-to: Your message of "Mon, 15 May 2000 13:47:15 EDT." Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII Date: Mon, 15 May 2000 18:20:44 -0400 From: Dave Mason Resent-From: weis@pauillac.inria.fr Resent-Date: Tue, 16 May 2000 10:21:41 +0200 Resent-To: caml-redist@pauillac.inria.fr >>>>> On Mon, 15 May 2000 13:47:15 -0400 (EDT), Hongwei Xi said: > What I had in mind is actually something pretty simple (since it > won't be very useful if it is not simple :-)) > Is it possible to have something like the following in the library: I propose something more like: Array.init_with_array: int -> (int -> (int -> 'a) -> 'a) -> 'a Array let Array.init_with_array n f = let a = Array.create n in for i = 0 to n - 1 do a.(i) <- f i (fun j -> if j