[Top][All Lists]

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

Scheme to elisp

From: weber
Subject: Scheme to elisp
Date: 16 May 2007 05:56:34 -0700
User-agent: G2/1.0

Hi everyone...
I started reading the sample chapter of the Friedman's books, but got
stuck trying to rewrite this scheme function in elisp:

(define intersect
        (lambda (set1 set2)
           ((I (lambda (set)
                           ((null? set) (quote ()))
                           ((member? (cat set1) set2)
                                (cons (car set)
                                          (I (cdr set))))
                           (else (I (cdr set)))))))
           (I set1))))

Or in a simplified form, my problem is : why the snippet below does
not work?

(defun f (n)
  (let ((g (lambda (x) (+ 5 x))))
        (g (+ n 1))))

(f 1) -> void-function g

Thanks in advance,

reply via email to

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