Skip to main content

patch_seq_if

Function patch_seq_if 

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

if: Branch on a Bool, invoking one of two quotations.

Stack effect: ( ..a Bool [..a – ..b] [..a – ..b] – ..b ) The two quotations must have identical effects (the typechecker enforces this); whichever runs leaves the stack in the same shape.

Layout at entry (top → bottom): else-quot, then-quot, cond.

§Safety

  • Stack must have at least 3 values (else-quot on top, then-quot below, Bool below that).
  • The top two values must be Quotations or Closures.
  • The third value must be a Bool.