POV-Ray : Newsgroups : povray.off-topic : A comparison : Re: A comparison Server Time
10 Oct 2024 17:19:51 EDT (-0400)
  Re: A comparison  
From: Warp
Date: 19 Mar 2008 04:46:52
Message: <47e0e10b@news.povray.org>
scott <sco### [at] laptopcom> wrote:
> You made it simpler, I can make the first one simpler too :-)

> 1. If LIST is not the empty list, then SUM(LIST) is defined as the result of 
> adding up the value at each node of LIST

  I can make it even simpler:

1. SUM(LIST) = the sum of the values of all nodes in LIST

  In some imperative languages that can be written as something along the
lines of:

sum = 0;
foreach(element in list) sum += element;

  (In some languages even the first line can be omitted if its default
behavior is that undeclared integral variables are automatically created
and initialized to 0.)

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.