caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Andreas Rossberg <rossberg@ps.uni-sb.de>
To: caml-list@inria.fr
Cc: Don Syme <dsyme@microsoft.com>
Subject: Re: arrays and type variables...
Date: Thu, 26 Nov 1998 17:03:57 +0100	[thread overview]
Message-ID: <365D7BED.3D876FFB@ps.uni-sb.de> (raw)
In-Reply-To: <39ADCF833E74D111A2D700805F1951EF0B2EF63B@RED-MSG-06>

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. ::




      parent reply	other threads:[~1998-11-26 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-25 13:57 Don Syme
1998-11-26 15:33 ` Pierre Weis
1998-11-26 16:03 ` Andreas Rossberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=365D7BED.3D876FFB@ps.uni-sb.de \
    --to=rossberg@ps.uni-sb.de \
    --cc=caml-list@inria.fr \
    --cc=dsyme@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).