Thread View: comp.lang.scheme.c
1 messages
1 total messages
Started by Aric Zion
Tue, 04 Jun 1991 15:23
LISP to SCHEME
Author: Aric Zion
Date: Tue, 04 Jun 1991 15:23
Date: Tue, 04 Jun 1991 15:23
60 lines
1409 bytes
1409 bytes
I am working on a program that will translate Common Lisp to Scheme, so that DEC's Scheme->C translator can then convert the Scheme to C. I have come up against a couple of problems, and I would appreciate some help. PROBLEM 1 --------- In SCHEME, (define ab-list '(a b)) performs the side effect and also evaluates to => ab-list In LISP, (setf ab-list '(a b)) also performs the side effect but evaluates to => (a b) PROBLEM 2 --------- SETF is global if the argument does not exist locally DEFINE is local even if the argument does not exist locally for example, In SCHEME, (define x 4) (define (somefunction) (define x 3) ) (somefunction) x => 4 But in LISP, (setf x 4) (defun somefunction () (setf x 3) ) (somefunction) x => 3 What can I do in these cases to make SCHEME emulate LISP. Please respond to: afz@reef.cis.ufl.edu Thanks, Aric Zion
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads