Date: Thu, 26 Nov 1998 17:03:57 +0100
From: Andreas Rossberg <firstname.lastname@example.org>
Subject: Re: arrays and type variables...
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) <- ;;
- : unit = ()
- : int list array = [||]
You cannot assign anything to the empty array [| |], however.
-- Andreas Rossberg, email@example.com
:: be declarative. be functional. just be. ::
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:17 MET