[Nickle] How to make min do the right thing?
Carl Worth
nickle@nickle.org
Wed, 18 Sep 2002 11:12:51 -0400
On Sep 16, Bart Massey wrote:
> The other obvious alternative is to use
>
> real min2(real emptymin, real[*] vals) {
Thanks Bart. Passing in the return value for the degenerate case is a
useful idea.
It doesn't solve the entire problem, (since I still have to come up
with a maximum value to pass in, which might be hard), but it at least
pushes that aspect of the problem outside of a function as general as
min should be.
-Carl