From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Bob Duff Newsgroups: comp.lang.ada Subject: Re: Two approaches of iterators for the key-value pairs Date: Sun, 29 Nov 2015 16:17:31 -0500 Organization: A noiseless patient Spider Message-ID: <874mg4mro4.fsf@theworld.com> References: <0c524381-442a-49cc-9d72-27a654320153@googlegroups.com> <073bed9a-32f2-4045-93ec-064322edf883@googlegroups.com> <834c6afa-870e-4921-a1f1-4fe2b061811a@googlegroups.com> <247bcf0b-af39-4e78-abe9-aa4810042f98@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="8bcdd77621fc9fc89fead967340f2479"; logging-data="31370"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QRUN7p8tQX2j6iI5yLWDu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:tAFjn5vEzBuBhNtnTUKpyq2aCqc= sha1:18YY9F/kGd338/XMEuuUyhsyMjk= Xref: news.eternal-september.org comp.lang.ada:28597 Date: 2015-11-29T16:17:31-05:00 List-Id: Simon Wright writes: > but we are now discovering that we don't just want to use it for > containers, rather for anything we might want to iterate over, such as > directory entries, prime numbers, ... "anything we might want to iterate over" = "container". At least, that's one way to look at it. E.g. the set of all prime numbers is a set, and a set is a container. A "virtual container" I suppose, because you're not going to store all the prime numbers in memory at once. - Bob