all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.