Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] use of `generics'
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michal Moskal <malekith@p...>
Subject: Re: [Caml-list] List to Tuple
On Sat, May 24, 2003 at 09:15:49AM +0200, Siegfried Gonzi wrote:
> I couldn't find the function which converts a List to a Tuple type.

ML type system isn't powerfull enough to express this construct, best
you can have is:

val conv2 : 'a * 'a -> 'a list
val conv3 : 'a * 'a * 'a -> 'a list
...

I'm not quite sure if it will change with generics.

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h

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