[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: rough draft of Python-style generators for elisp
From: |
Levin Du |
Subject: |
Re: RFC: rough draft of Python-style generators for elisp |
Date: |
Thu, 29 Nov 2012 16:41:29 +0800 |
Hi Daniel,
My Emacs version is "GNU Emacs 24.3.50.1".
I tried:
(defgenerator mygen (i)
(yield 1)
(yield i)
(yield 3))
(let ((gen (mygen 100)))
(list (funcall gen)
(funcall gen)
(funcall gen)))
but failed with:
Debugger entered--Lisp error: (void-variable cps-current-state-91642)
(funcall cps-current-state-91642)
(while t (funcall cps-current-state-91642))
(catch (quote cps-yield) (while t (funcall cps-current-state-91642)))
(lambda nil (catch (quote cps-yield) (while t (funcall cps-current-state-91642))))()
funcall((lambda nil (catch (quote cps-yield) (while t (funcall cps-current-state-91642)))))
(list (funcall gen) (funcall gen) (funcall gen))
(let ((gen (mygen 100))) (list (funcall gen) (funcall gen) (funcall gen)))
eval((let ((gen (mygen 100))) (list (funcall gen) (funcall gen) (funcall gen))) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp)
ex-eval-region-or-sexp()
call-interactively(ex-eval-region-or-sexp nil nil)