Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Coroutines for lisp

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.org
Octocat-spinner-32 package.lisp
Octocat-spinner-32 rpd-coroutines.asd
Octocat-spinner-32 rpd-coroutines.lisp
README.org

rpd-coroutines

This library implements coroutines, using continuations.

Usage Examples

simple

> (defvar c (make-coroutine () (yield 1) (yield 3))) C > (funcall c) 1 > (funcall c) 3 > (funcall c) :DONE > (funcall c) :DONE

pick your own “done” value:

> (setf c (make-coroutine (:done-value nil) (yield 1)) C > (funcall c) 1 > (funcall c) NIL > (funcall c) NIL

pick a name other than “yield”

> (setf c (make-coroutine (:yield generate) (generate 1)) C > (funcall c) 1 > (funcall c) :DONE

Something went wrong with that request. Please try again.