From: John M. S. <sk...@oz...> - 2003-04-14 06:55:16
|
> Sure. I don't feel strongly about this one. Let's have a separate > function for indexing from the end. No. If there is any doubt, leave it out. This operation is entirely unnecessary in Ocaml which is perfectly capable of doing index calculations and at the same time controlling scopes .. unlike some other languages :-) let last a = let n = size a in if n>0 then get a (n - 1) else raise IndexError let from_end a i = (* easy user space routine *) Easy routines like this which are not heavily used should NOT be put in libraries. IMHO :-) -- John Max Skaller, mailto:sk...@oz... snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 |