Quickest way to find out if a sequence is/isn't empty?
- Posted by ZNorQ Oct 14, 2013
- 1370 views
What would be the quickest way to verify if a sequence is/isn't empty? This especially applies to sequences of considerable sizes.
What I'm trying to explain, is that if a sequence contains data, I don't want the code to iterate through the whole sequence to verify that it ISN'T empty.. I'm guessing not length(mySequence) (or length(mySequence)=0) wouldn't be the quickest one, as it would presumably count through the whole sequence and THEN find out that it isn't empty.
I've also used equal({}, mySequence), but I'm kind of guessing that that also would run through the whole sequence before finding out that it isn't empty.
Regards, ZNorQ aka Kenneth