You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let query = [yql| SELECT name FROM github.user.info WHERE id = $s(name); |]
name ="dag"in [jmacro| YUI().use "yql" \y ->
y.YQL `(query)` \r ->
alert r.query.results.user.name |]
However preferably more type safe: the above query can be used as a string anywhere in JS. One option is to save the callback in a variable:
[jmacro| YUI().use "yql" \y
{ var cb = \r -> alert r.query.results.user.name
; `(query y cb)`
} |]
However, having to name the function is arguably ugly.
The text was updated successfully, but these errors were encountered:
Something like:
However preferably more type safe: the above query can be used as a string anywhere in JS. One option is to save the callback in a variable:
[jmacro| YUI().use "yql" \y { var cb = \r -> alert r.query.results.user.name ; `(query y cb)` } |]
However, having to name the function is arguably ugly.
The text was updated successfully, but these errors were encountered: