Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: WatchDog <watchdog@n...>
Subject: [Caml-list] No patterns of type vect
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) ?

JB, Paris.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: