Welcome to the CHICKEN Scheme pasting service

simple vector addition... added by szablica on Tue Feb 26 21:48:30 2013

(use srfi-1)

(define-record vect x y)

(define (vect-add . vs)

  (define (add-two a b)
    (make-vect (+ (vetc-x a) (vetc-x b))
               (+ (vetc-y a) (vetc-y b))))

  (fold add-two zero-vect vs))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What type of object does `for-each' expect as second argument?
Visually impaired? Let me spell it for you (wav file) download WAV