Your problem is that tcp-connect returns multiple values; not a list, but multiple values. What you need to do is extract the two values into a list, and return them. This can be done via mzscheme's call-with-values procedure, takes two functions; the first is called with no arguments, and generates multiple values; the second is called on all of the values. Thus, you want, if memory serves, the entirely untested
(xdef 'tcp-connect
(lambda (host port . rest)
(call-with-values
(lambda () (apply tcp-connect host port rest))
list)))
Give that a shot, and see if it works.
I never knew that mzscheme had multiple return values… learn something new every day, I guess!
Why? because there isn't that much in lisp/scheme/arc that comes naturally to me :).
Not sure about how to go about pushing something on something else. Never been in an environment where we worked with cvs or git or anything. Solitary scientists :)
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 :)