Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: How can I make Reduce run from right to left? Date: Tue, 10 Dec 2024 22:04:02 +0100 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 10 Dec 2024 22:04:32 +0100 (CET) Injection-Info: dont-email.me; posting-host="a4660752f0400363465e8230ce48324e"; logging-data="1200493"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19FeEJ/aZuA8r1KfwLmUpblRU1G4ZcRKHM=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:zM8K4AhJSYv+jemKFIF9qBOOn3w= Content-Language: en-US In-Reply-To: Bytes: 1552 On 2024-12-10 18:20, Brian9000 wrote: >  Ada.Text_IO.Put_Line (Real'Image ([ for i in reverse 0 .. data'Last - > 1 => data(i) ]'Reduce("-", data(data'Last)))); Presumably you could do [for I in 0 .. Data'Last - 1 => Data (Data'Last - 1 - I)]'Reduce Or write a Reverse function Reverse (Data (0 .. Data'Last - 1) )'Reduce -- Jeff Carter "An essential part of teaching Ada is not the technical details, but the message of software engineering." Jean-Pierre Rosen 167