Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] two unrelated questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Max Skaller <skaller@o...>
Subject: Re: [Caml-list] two unrelated questions
Brian Rogoff wrote:
> 
I wrote:

> >   let rec foldc remove kons knil l = match remove l with
> >       | (_,None) -> knil
> >       | (xs,Some x) -> kons x knil (fun rest -> foldc remove kons rest xs)
> >
> >   let foldc_list = foldc (fun l -> match l with
> >               | [] -> l,None
> >               | x::xs -> xs,Some x)

	But this doesn't actually work: it makes the types monomorphic unknowns
('_a etc). I should have written out the parameters explicitly to avoid
this:

	let foldc_list kons knil l = ....
 
-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr