evm v0.1.14 EVM.Operation.Exchange
Link to this section Summary
Functions
Swaps the first and last values on the stack
Link to this section Functions
Link to this function
swap(list, vm_map)
swap(Operation.stack_args, Operation.vm_map) :: Operation.op_result
Swaps the first and last values on the stack.
Examples
iex> EVM.Operation.Exchange.swap([1, 2, 3], %{})
[3, 2, 1]
iex> EVM.Operation.Exchange.swap([1, 2, 3, 4, 5, 6], %{})
[6, 2, 3, 4, 5, 1]