Arc Forumnew | comments | leaders | submitlogin
1 point by almkglor 5848 days ago | link | parent

Might be better:

  (xdef 'tcp-connect
        (lambda (host port . rest)
          (call-with-values
            (lambda () (apply tcp-connect host port rest))
            (lambda (x y)
              (cons x (cons y 'nil))))))


1 point by absz 5848 days ago | link

Ouch, I hadn't thought of that. But I just tested this, and it appears that ac.scm runs the translation step after the xdefed functions return, so we get a valid Arc list back. Saved by the bell, so to speak :)

-----