Welcome to the CHICKEN Scheme pasting service

index-list added by mario-goulart on Wed May 30 22:25:11 2012

(define (index-list l)
  (let loop ((l l)
	     (i 1))
    (if (null? l)
	'()
	(cons (cons i (car l))
	      (loop (cdr l)
		    (+ 1 1))))))

(pp (index-list '(a b c d)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Proper ... recursion is required by the Scheme specification.
Visually impaired? Let me spell it for you (wav file) download WAV