From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.7 required=3.0 tests=BAYES_00,NICE_REPLY_A, REPLYTO_WITHOUT_TO_CC,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: project euler 26 Date: Fri, 8 Sep 2023 08:09:55 +0200 Organization: A noiseless patient Spider Message-ID: References: <878r9mudvj.fsf@bsb.me.uk> <87a5u1u1yv.fsf@bsb.me.uk> <8734ztttpc.fsf@bsb.me.uk> <87fs3ssl6v.fsf@bsb.me.uk> <87a5u0rts0.fsf@bsb.me.uk> <87jzt3qqlb.fsf@bsb.me.uk> <87o7ieq3ne.fsf@bsb.me.uk> Reply-To: nonlegitur@notmyhomepage.de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 8 Sep 2023 06:09:55 -0000 (UTC) Injection-Info: dont-email.me; posting-host="4f0b5417a67fb6014c2ccf9640695d36"; logging-data="3536073"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FRCnZX4RMmdJLp8uPYDK4PqizeNPazQI=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Cancel-Lock: sha1:cqaF+xwhbvUuyl5wD6VK3mldDKI= In-Reply-To: <87o7ieq3ne.fsf@bsb.me.uk> Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:65619 List-Id: On 07.09.23 01:32, Ben Bacarisse wrote: > A fix (though it's not really ideal) would be to use function > composition here (inventing . as the composition operator): Hm. A stateful, composed function that needs to be applied in a certain way. Is that so different from calling interface subprograms of a certain type? A wild guess: only "monads" would add substantial toppings to the commonalities. Considering the computational powers of C++'s "hair-raising template metaprogramming" [14.4], the idea of "Ada generics" = "functional style" is probably limited in scope. So, does type composition help? [14.4]: A Tour of C++, 3rd ed.