Function patch_seq_roll
Source #[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_roll(
stack: *mut StackValue,
) -> *mut StackValue
Expand description
Roll: Rotate n+1 items, bringing the item at depth n to the top
( x_n x_(n-1) … x_1 x_0 n – x_(n-1) … x_1 x_0 x_n )
§Safety
Stack must have at least n+1 values (plus the index value).
§Errors
Sets runtime error if:
- The top value is not an Int
- n is negative
- n exceeds the current stack depth