* Re: Re: [Caml-list] Depend-type beginner question
@ 2007-10-05 16:43 olsongt
0 siblings, 0 replies; only message in thread
From: olsongt @ 2007-10-05 16:43 UTC (permalink / raw)
To: caml-list
> > The type system is not rich enough to distinguish between 0-lists'
> > and 1-list's. It is just a list.
>
> So what is the gain ?
I'm not sure about the actual implementation, but in theory a list is something like:
type 'a list = Nil | Cons of 'a * 'a list
[] and [a] and h :: t are just syntactic sugar.
So lists don't even know their own length internally, unlike an array.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-05 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-05 16:43 Re: [Caml-list] Depend-type beginner question olsongt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox