[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 1998-11-26 (16:09) |
From: | Andreas Rossberg <rossberg@p...> |
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) <- [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. ::