---------- Forwarded message ----------
From: William Neumann <wneumann@...>
Date: Nov 24, 2005 2:58 PM
Subject: Re: [Ocaml-lib-devel] ExtArray?
To: Amit Dubey <amit.dubey@...>
On Nov 24, 2005, at 7:16 AM, Amit Dubey wrote:
> Will this return the element or an index?
If I were writing it (and I'm sure I have at some point) I'd have
return the element, but I'd also have an Array.findi that returned
the element and it's index (and just define Array.find as snd
(Array.findi ...) ).
> Would these return lists or arrays?
I'd have them return arrays, myself. Less efficient, perhaps, but
certainly more consistent. And if I wanted lists back, I'd just use
List.XXX (Array.to_list arr).
William D. Neumann
"I eat T-bone steaks, I lift barbell plates, I'm sweeter than a
German chocolate cake. I'm the reflection of perfection, the number
one selection. I'm the man of the hour, the man with the power, too
sweet to be sour. The ladies' pet, the men's regret, where what you
see is what you get, and what you don't see, is better yet."
--Superstar Billy Graham