diff --git a/proxy.rkt b/proxy.rkt index 6767b3d..218cdad 100644 --- a/proxy.rkt +++ b/proxy.rkt @@ -323,24 +323,25 @@ (transition: w : QHState (send-message (answered-question q ans)))] [(partial-answer base cnames) (transition: (expanding-cnames q base (length cnames)) : QHState - (map (lambda: ([cname : DomainName]) - ;; TODO: record chains of CNAMEs to avoid pathologically-long chains - (define cname-q (cname-question cname q)) - (list (send-message cname-q) - (endpoint: (expanding-cnames q acc remaining) : QHState - #:subscriber (answered-question-pattern cname-q (wild)) - #:let-name subscription-id - [(answered-question (== cname-q) ans) - (let () - (define new-acc (if ans (merge-answers acc ans) acc)) - (define new-remaining (- remaining 1)) - (define new-w (expanding-cnames q new-acc new-remaining)) - (transition: new-w : QHState - (delete-endpoint subscription-id) - (if (zero? new-remaining) - (send-message (answered-question q new-acc)) - '())))]))) - cnames))])])) + ((inst map (ActionTree QHState) DomainName) + (lambda: ([cname : DomainName]) + ;; TODO: record chains of CNAMEs to avoid pathologically-long chains + (define cname-q (cname-question cname q)) + (list (send-message cname-q) + (endpoint: (expanding-cnames q acc remaining) : QHState + #:subscriber (answered-question-pattern cname-q (wild)) + #:let-name subscription-id + [(answered-question (== cname-q) ans) + (let () + (define new-acc (if ans (merge-answers acc ans) acc)) + (define new-remaining (- remaining 1)) + (define new-w (expanding-cnames q new-acc new-remaining)) + (transition: new-w : QHState + (delete-endpoint subscription-id) + (if (zero? new-remaining) + (send-message (answered-question q new-acc)) + '())))]))) + cnames))])])) (require "test-rrs.rkt") (require racket/file)