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
Array.Swap()
Updates onflow/cadence#2626
Currently, there is no Atree function to swap two elements of an Array, so Cadence needs to do a remove and insert which can be inefficient.
Array
Thanks @bluesign for bringing this up at onflow/cadence#2626! 👍
Add Array.Swap() to swap two elements in place.
The text was updated successfully, but these errors were encountered:
reverseInPlace
@fxamacker How much work would it be to add such a function?
Sorry, something went wrong.
@turbolent About 2-3 uninterrupted person-days to add function and tests.
@turbolent Is this feature still needed?
I can re-estimate work required because of changes in atree v0.8.0 (e.g. atree inlining & deduplication, etc.).
fxamacker
No branches or pull requests
Updates onflow/cadence#2626
Issue To Be Solved
Currently, there is no Atree function to swap two elements of an
Array
, so Cadence needs to do a remove and insert which can be inefficient.Thanks @bluesign for bringing this up at onflow/cadence#2626! 👍
Suggested Solution
Add
Array.Swap()
to swap two elements in place.The text was updated successfully, but these errors were encountered: