Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type 'a vector = { size: int; vec : 'a array; }
- let get v i =
- if i < 0 || i >= v.size then failwith "Vector.get";
- Array.unsafe_get v.vec i
- let get1 v i =
- match v with
- {size=l; vec=v1} ->
- if i < 0 || i >= l then failwith "Vector.get"
- else Array.unsafe_get v1 i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement