safe icon indicating copy to clipboard operation
safe copied to clipboard

It looks like the function current is missing

Open bilelgasmi opened this issue 5 years ago • 1 comments

Hi, it looks like current() is missing.

Any plans to add it? Thanks!

bilelgasmi avatar Jan 05 '21 08:01 bilelgasmi

This family of functions can return false because they are empty, or can return false because the element contains an element with the value false, so one can't spot the error by looking just at the return value.

We could potentially add special-cases for this family of functions where we first check the length of the array, throw an exception if the array is empty, and then go on to return whatever the function returns, but that's slightly less-trivial

shish avatar Feb 07 '25 22:02 shish