Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.async by
Discovered this while using {{tools.cli 0.3.1}} where it's handy to destructure one of their returned maps which has a key {{:arguments}}, but you can reproduce it like so:


(let [arguments [:a :b]]
    (println "Args Sync:" arguments)
    (go (println "Args Async:" arguments)))


which prints


Args Sync: [:a :b]
Args Async: #js {:0 #js [#<function (state_12638){
switch(arguments.length){
case 0:
return dls$rip$core$go_BANG__$_state_machine__6252__auto____0.call(this);
case 1:
return dls$rip$core$go_BANG__$_state_machine__6252__auto____1.call(this,state_12638);
}
throw(new Error('Invalid arity: ' + arguments.length));
}> 1 nil nil nil nil #<[object Object]>]}


I haven't tested this in the browser yet, so it might not be limited to node.

2 Answers

0 votes
by

Comment made by: lorddoig

Just tried, can't reproduce in Chrome.

0 votes
by
Reference: https://clojure.atlassian.net/browse/ASYNC-118 (reported by alex+import)
...