On Fri, Mar 18, 2016 at 10:53 PM, Will Stanton via swift-users
<[email protected]> wrote:
> I might have missed something since a lot of the results are for tests
> <https://github.com/apple/swift/search?utf8=✓&q=underestimatedCount&type=Code>
> But why would `underestimatedCount` ever be used instead of `count`? Don’t
> most collections have O(1) `count` anyway?
Hi Will,
This API comes from Sequence, which does not have a count that you can
inspect without possibly consuming the sequence.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users