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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a3736685ef876ab2 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!feeder.news-service.com!proxad.net!feeder1-2.proxad.net!fdn.fr!freenix!sn-xt-sjc-05!sn-xt-sjc-06!sn-post-sjc-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail From: Matthew Heaney Newsgroups: comp.lang.ada Subject: Re: OO Style with Ada Containers Date: Tue, 20 Nov 2007 02:24:59 +0000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <1195082906.420079.195000@d55g2000hsg.googlegroups.com> <1s27rv0gt4ujj$.3e2k326rp54d.dlg@40tude.net> <60e46dc9-d8ca-4f47-9e8a-f90a7d45e752@w28g2000hsf.googlegroups.com> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:lwjzdpML7wY9ffEd3a/AmGM6QPM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@supernews.com Xref: g2news1.google.com comp.lang.ada:18520 Date: 2007-11-20T02:24:59+00:00 List-Id: Maciej Sobczak writes: > Now consider an iterator generating a (samples of) sine wave with > given parameters. Infinitely! It plays a sound using attached DAC. > > There is no container behind. Just a sequence. That's more or less the model used to implement the random number generator. The Random function delivers one element at a time from a virtual stream. If you needed to plug a generator instance into a generic algorithm, then you could easily use an object adapter to convert from the generator interface to the sequence (cursor) interface.