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 RAA01535 for caml-redistribution; Thu, 26 Nov 1998 17:09:07 +0100 (MET) 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 RAA24710 for ; Thu, 26 Nov 1998 17:04:03 +0100 (MET) Received: from grizzly.ps.uni-sb.de (grizzly.ps.uni-sb.de [134.96.186.119]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id RAA16426 for ; Thu, 26 Nov 1998 17:04:02 +0100 (MET) Received: from ps.uni-sb.de (IDENT:rossberg@emerald.ps.uni-sb.de [134.96.186.105]) by grizzly.ps.uni-sb.de (8.9.1a/8.9.1) with ESMTP id RAA23911; Thu, 26 Nov 1998 17:03:57 +0100 Sender: weis Message-ID: <365D7BED.3D876FFB@ps.uni-sb.de> Date: Thu, 26 Nov 1998 17:03:57 +0100 From: Andreas Rossberg Organization: Universität des Saarlandes X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.35 i686) MIME-Version: 1.0 To: caml-list@inria.fr CC: Don Syme Subject: Re: arrays and type variables... References: <39ADCF833E74D111A2D700805F1951EF0B2EF63B@RED-MSG-06> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Don Syme wrote: > > Shouldn't "[| [] |]" count as a value?? > > # let x = [| [] |];; > val x : '_a list array = [|[]|] > # let x = [];; > val x : 'a list = [] > # let x = [| |];; > val x : 'a array = [||] No, because you can assign to arrays: # let x = [| [] |];; val x : '_a list array = [|[]|] # x.(0) <- [1];; - : unit = () # x;; - : int list array = [|[1]|] You cannot assign anything to the empty array [| |], however. Regards, - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de :: be declarative. be functional. just be. ::