Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Finding Average without using Recusrion only using Prog
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RG  
View profile  
 More options Nov 4 2012, 10:07 am
Newsgroups: comp.lang.lisp
From: RG <rNOSPA...@flownet.com>
Date: Sun, 04 Nov 2012 08:07:39 -0700
Local: Sun, Nov 4 2012 10:07 am
Subject: Re: Finding Average without using Recusrion only using Prog
In article <afmocbFkjd...@mid.individual.net>,
 Nils M Holm <news2...@t3x.org> wrote:

> WJ <w_a_x_...@yahoo.com> wrote:
> > > (define (avg n*)
> > >   (/ (apply + n*)
> > >      (length n*)))

> > > Substitute SRFI-1 FOLD for APPLY, if your APPLY is broken
> > > (i.e. limited to some maxmimum number of arguments).

> > You completely missed the point, which was to avoid
> > traversing the list more than once.  Consequently,
> > you solved an entirely different problem.

> APPLY does not traverse the list. Problem solved.

Of course it does.  How else could it access the arguments to the
function being applied?

rg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.