开发者

Is there macros for rewrite CPS?

For example I have two async methods

(get-a 10 (lambda (a) (get-b a (lambda (b) (display b)))

but I want to write something similar to

(define (a (get-开发者_StackOverflow中文版a 10)))
(define (b (get-b a)))
(display b)


No. CPS is a global transformation, and macros local transformers. See also "On the Expressive Power of Programming Languages".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜