Welcome to the CHICKEN Scheme pasting service

When to use lambdas? added by charlietanksley on Tue Jul 12 19:53:49 2011

; This comes from the 3rd edition of The Little Lisper
(define member?
  (lambda (a lat)
    (cond
      ((null? lat) #f)
      (#t (or
            (eq? (car lat) a)
            (member? a (cdr lat)))))))

; This is a modified version I wrote
(define (member2? a lat)
  (cond
    ((null? lat) #f)
    (else (or
            (eq? (car lat) a)
            (member2? a (cdr lat))))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `string-intersperse'?
Visually impaired? Let me spell it for you (wav file) download WAV