help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Help with coroutine.el


From: Pascal J. Bourguignon
Subject: Re: Help with coroutine.el
Date: Sun, 12 Apr 2015 22:50:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Davin Pearson <address@hidden> writes:

> something like this:
>
> (defun foo ()
>    (message "hello")
>    (yield)
>    (message "goodbye"))
>
> (foo) -> "hello"
> (foo) -> "goodbye"
>
> I don't know how you go about defining a coroutine function like foo.

You can have a look at the Common Lisp library Arnesi, which contains a
CPS transformer, that would help doing that.

https://common-lisp.net/project/bese/docs/arnesi/html/Automatically_Converting_a_Subset_of_Common_Lisp_to_CPS.html
 


-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


reply via email to

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