[plt-scheme] trying to make a function that adds a list
I believe Matthias has partially given you what I had hinted at. It is an
excellent start.
Marco
P.S. I must agree that this is rather hard for a second Scheme program.
On 2/18/07, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
>
>
> On Feb 17, 2007, at 2:23 PM, trista wrote:
>
> > The assignment is as follows:
> >
> > Write a Scheme functin that accepts an accumulating functin
> > (summation, product) and a list of numbers and returns the
> > accumulation of the operation on each element of the list. If the
> > list '(1 2 3 4 ) was supplied and an operatin "sum" that adds two
> > elements, the function should return the sum of the list.
>
>
> Your assignment statement is flawed. The function should also consume
> the identity element for the accumulation operation. (And nobody
> should assign this as a second problem in Scheme.) -- Matthias
>
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070220/f5f3edd0/attachment.html>