Implement yield and send in Scheme

前端 未结 3 1785
你的背包
你的背包 2020-12-06 03:17

I\'m trying to port yield and yield from from Python to Scheme.

Here is an implementation I\'ve done:

(define (coroutine ro         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-06 04:05

    One approach is here. If you are using guile, you should use prompts (they are about two orders of magnitude faster than using full continuations with guile):

    How to implement Python-style generator in Scheme (Racket or ChezScheme)?

提交回复
热议问题