Zips the a-th and b-th u32 elements from the top and keep the one chosen (given as the first parameter) in the stack (without preserving order) Assuming a is smaller than b and x_i denoting the i-th part of the x-th number: Input: ... (a u32 elements) a_0 a_1 a_2 a_3 ... (b - a - 1 u32 elements) b_0 b_1 b_2 b_3 Output: b_0 a_0 b_1 a_1 b_2 a_2 b_3 a_3 ... (b u32 elements including the element that
(a: u32, b: u32)
| 26 | /// Input: ... (a u32 elements) a_0 a_1 a_2 a_3 ... (b - a - 1 u32 elements) b_0 b_1 b_2 b_3 |
| 27 | /// Output: b_0 a_0 b_1 a_1 b_2 a_2 b_3 a_3 ... (b u32 elements including the element that is chosen to stay and rest of the stack) |
| 28 | pub fn u32_copy_zip(a: u32, b: u32) -> Script { |
| 29 | if a < b { |
| 30 | _u32_copy_zip(a, b) |
| 31 | } else { |
| 32 | _u32_zip_copy(b, a) |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | /// Helper for u32_copy_zip |
| 37 | pub fn _u32_copy_zip(mut a: u32, mut b: u32) -> Script { |
nothing calls this directly
no test coverage detected