[REBOL] Re: REBOL Enhancement Proposals (REPs)
From: joel:neely:fedex at: 27-Sep-2001 12:14
Hi, Ladislav,
Ladislav Mecir wrote:
> Hi Joel,
>
> here you have got my trial:
>
> cfor [i: 1 b: at a 2 c: at a 3] [(length? a) - 1 > i] [
> change at b i a/:i + b/:i + c/:i / 3
> i: i + 1
> ]
>
> CFOR is the function I defined in http://www.sweb.cz/LMecir/highfun.r
>
> BTW, is your Perl implementation correct?
>
> > ... That is, the equivalent of the Perl
> >
> > for (my $i = 1; $i < $#a; ++$i) {
> > $a[$i] = ($a[$i-1] + $a[$i] + $a[$i+1])/3;
> > }
> >
Yes, AFAICT. It even agrees with uSoft XL! ;-)
What looked suspicious to you?
-jn-
--
This sentence contradicts itself -- no actually it doesn't.
-- Doug Hofstadter
joel<dot>neely<at>fedex<dot>com