[plt-scheme] Lispish system in Scheme

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


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
process and do somehting like the code below (in pseudocode).
(It used to be a teaching exercise in LISP, how to write
I thought I could do something similar in Scheme.)

Peter Ivanyi

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

(define (my-eval expr)
    ((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?

Posted on the users mailing list.