Skip to main content

patch_seq_keep

Function patch_seq_keep 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_keep(stack: Stack) -> Stack
Expand description

keep: Run quotation on top value, but preserve the original.

Stack effect: ( ..a x quot – ..b x ) where quot : ( ..a x – ..b )

Like dip, but the quotation also receives the preserved value. Equivalent to: over >aux call aux>

§Safety

  • Stack must have at least 2 values (quotation on top, value below)
  • Top of stack must be a Quotation or Closure