in reply to Re: extracting corresponding values from another array
in thread extracting corresponding values from another array

This is predicated on @numbers being sorted, a precondition we werent provided with, furthermore if the list is empty it returns an incorrect result. Ie 0.

Sorry, I misread the shift() as somehow being pop(). (/note to self, get glasses checked, and reduce the caffiene intake :-) But its still does return a 0 if there are no elements...

--- demerphq
my friends call me, usually because I'm late....

  • Comment on Re: Re: extracting corresponding values from another array