[plt-scheme] Lispish system in Scheme

From: Ivanyi Peter (pivanyi at freemail.hu)
Date: Thu Jun 22 11:31:56 EDT 2006

Hi,

Thanx for all the answers, I will look into them. Just to
clarify what
I was/am looking for: a "simple" way to create a Lispish
style language.
For example I thought that I could simply override the
evaluation 
process and do somehting like the code below (in pseudocode).
(It used to be a teaching exercise in LISP, how to write
LISP in LISP.
I thought I could do something similar in Scheme.)

Peter Ivanyi


------ pseudo code starts here -----

(define (my-eval expr)
  (cond
    ((or (number? expr) (string? expr)) expr)
    ((symbol? expr)
      (let ((value (lookup expr)))
        (if value value 'default-value))
    )
    ; just one example
    ((and (list? expr) (equal? (car expr) 'list))
     (my-apply list (map (lambda (x) (my-eval)) (cdr expr)))
    )
   ; all other functions recognised by the evaluator comes here
   ; .....
   ; others
    ((and (list? expr) (equal? (car expr) 'lambda))
     (check-and-eval-lambda expr)
    )
  )
)

________________________________________________________________________________
Ön lemondana havi 6000Ft, évi 72 000 Ft állami támogatásról?
http://lakaskassza.origo.hu/index.html




Posted on the users mailing list.