guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

two elementary questions -- corrected


From: KELLEHER,KEVIN (Non-HP-Roseville,ex1)
Subject: two elementary questions -- corrected
Date: Tue, 11 Dec 2001 14:41:38 -0500

1.  What is the difference in meaning between these two expressions?

        (lamdba x  x)
        (lambda (x) x)

2. I've been doing the exercises in a learning-scheme book, and one is
to implement the "list" function.  What is wrong here?

        (define (list . x)
                (cond
                        ((null? x) '())
                        ((null? (cdr x)) x)
                        (else (cons (car x) (list (cdr x))))))

(list 1 2 3 4) => (1 (2 3 4)), but I want (1 2 3 4).


Kevin Kelleher



reply via email to

[Prev in Thread] Current Thread [Next in Thread]