comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: How can I make Reduce run from right to left?
Date: Tue, 10 Dec 2024 22:04:02 +0100	[thread overview]
Message-ID: <vjaac2$14kbd$1@dont-email.me> (raw)
In-Reply-To: <aa2e9cf6fcb092ba4e227a41b05ae707@www.novabbs.com>

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

  parent reply	other threads:[~2024-12-10 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 17:20 How can I make Reduce run from right to left? Brian9000
2024-12-10 17:54 ` J-P. Rosen
2024-12-10 17:57 ` J-P. Rosen
2024-12-10 21:04 ` Jeffrey R.Carter [this message]
2024-12-11  0:15 ` Brian9000
2024-12-11  1:38 ` Brian9000
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox