Skip to content

Add Array.Swap() to swap two elements in place #326

Description

@fxamacker

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.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions