6 Mar
2014
6 Mar
'14
22:48
On Mar 6, 2014, at 2:22 AM, Marc Feeley <feeley@iro.umontreal.ca> wrote:
For the other way around (exporting a Scheme function callable from JavaScript), the js function can be used like this:
(define setglo (js "function (name,val) { window[name] = val; }"))
then
(setglo "foo" (lambda (n) (* n n)))
And then in JavaScript land your can call (foo 10).
Ha! I meant foo(10) of course! Marc