unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Scheme to elisp
@ 2007-05-16 12:56 weber
  2007-05-16 15:58 ` Joost Kremers
  0 siblings, 1 reply; 3+ messages in thread
From: weber @ 2007-05-16 12:56 UTC (permalink / raw)
  To: help-gnu-emacs

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)
	  (letrec
	   ((I (lambda (set)
			 (cond
			   ((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,
-weber

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-16 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16 12:56 Scheme to elisp weber
2007-05-16 15:58 ` Joost Kremers
2007-05-16 17:18   ` weber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).