Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] No patterns of type vect
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] No patterns of type vect
On Sun, May 04, 2003 at 06:07:25PM +0200, WatchDog wrote:
> Hello !
> I'm using CamlLight 0.74, and I've just noticed it is not possible to 
> use a pattern-matching with patterns of type vect.
> For instance, the dummy function below is not valid :
> 
> let head = function
> [||] -> failwith "no_head"
> | t -> t.(0) ;;
> 
> OK, I acknowledge that lists would be more suitable for such a function, 
> but why is it forbidden to match on vectors (or arrays, for the 
> Objective Camlists) ?

It works in objective caml, so I suspect it just hadn't been done yet in
CamlLight.

Dave

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