We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nth should emit code the same as unchecked-get:
nth
unchecked-get
(nth [1 2 3] 2)
([1, 2, 3][2])
The text was updated successfully, but these errors were encountered:
This is actually a little trickier than I originally thought. The issue is that nth in Clojure supports nil, which we need for safe destructuring:
nil
(let [[foo bar] nil] foo)
Is a perfectly valid bit of code, but would fail if we translated it to
(function () { let foo = null[0]; let bar = null[1]; return foo; })()
Sorry, something went wrong.
Yeah, maybe this isn't worth the risk of breakage. I'll close this for now.
No branches or pull requests
nth
should emit code the same asunchecked-get
:The text was updated successfully, but these errors were encountered: