Last active
July 6, 2017 06:19
-
-
Save GauthamBanasandra/03b9b7dcf963e8dce604b0b96d319cb6 to your computer and use it in GitHub Desktop.
Change in maintaining exit status.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// User code | |
function query() { | |
for (var r of res) { | |
return r; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function query() { | |
if (res.isInstance) { | |
res.x = res.iter(function (r) { | |
return res.stopIter({ | |
'code': 'return', | |
'args': '(r)', | |
'data': r | |
}); | |
}); | |
switch (res.x.code + res.x.args) { | |
case 'return(r)': | |
return res.x.data;; | |
} | |
} else { | |
for (var r of res) { | |
return r; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function query() { | |
if (res.isInstance) { | |
res.iter(function (r) { | |
return res.stopIter({ | |
'code': 'return', | |
'args': '(r)', | |
'data': r | |
}); | |
}); | |
switch (res.getReturnValue(true)) { | |
case 'return(r)': | |
return res.getReturnValue().data;; | |
} | |
} else { | |
for (var r of res) { | |
return r; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment