Browse thread
[Caml-list] How to read three integers from a text-file... ?
[
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: | 2002-05-02 (11:03) |
From: | Francois Pottier <francois.pottier@i...> |
Subject: | Re: [Caml-list] Extensible tuple types |
On Thu, May 02, 2002 at 11:42:35AM +0200, Alain Frisch wrote: > > I don't understand what this encoding of extensible tuples allows, > compared to the simple minded solution [the type of an n-typle is > (t1,(t2,...(tn,unit)...)) ] You're right -- and I should think more before I write -- it's essentially the same solution. You do need to distinguish the kind of sequences from the kind of types, though (that is, to distinguish sequence extension ; from the product * and the empty sequence nil from the unit type), otherwise you can't distinguish a tuple from a cascade of pairs. But, apart from that, you're right, it's the same thing. -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners