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".
精彩评论