I happened, randomly, to notice this sentence in the description of p:count:
This provides a convenient mechanism to discover, for example, if a sequence consists of more than 1 document, without requiring every single document to be buffered before processing can continue.
That reference to buffering and continuing is unjustified. I've changed it to:
This provides a convenient mechanism to discover, for example, if a sequence consists of more than 1 document, without requiring every document to be counted.
I'm not sure that's exactly true either (my implementation counts them all and then returns min($count,$limit)), but I think it's an improvement.
I happened, randomly, to notice this sentence in the description of
p:count
:That reference to buffering and continuing is unjustified. I've changed it to:
I'm not sure that's exactly true either (my implementation counts them all and then returns
min($count,$limit)
), but I think it's an improvement.