pub fn walk_code(code: &Code, p: usize, mut walker: impl FnMut(&Line))
{
    let mut queue = VecDeque::from(vec![p]);

    while let Some(first_idx) = queue.pop_front() {
        let mut last_idx = first_idx;

        capture_next_range(code, &mut queue, &mut last_idx);

        for instr in &code[first_idx .. last_idx + 1] {
            walker(instr);
        }
    }
}
/* This function walks the code of a single predicate, supposed to
 * begin in code at the offset p. Each instruction is passed to the
 * walker function.
 */
This function walks the code of a single predicate, supposed to
begin in code at the offset p. Each instruction is passed to the
walker function.
This function walks the code of a single predicate supposed to begin in code at the offset p . Each instruction is passed to the walker function .
pub fn walk_code(code: &Code, p: usize, mut walker: impl FnMut(&Line))
{
    let mut queue = VecDeque::from(vec![p]);
    while let Some(first_idx) = queue.pop_front() {
        let mut last_idx = first_idx;
        capture_next_range(code, &mut queue, &mut last_idx);
        for instr in &code[first_idx .. last_idx + 1] {
            walker(instr);
        }
    }
}
pub fn walk_code ( code : & Code , p : usize , mut walker : impl FnMut ( & Line ) ) { let mut queue = VecDeque :: from ( vec ! [ p ] ) ; while let Some ( first_idx ) = queue . pop_front ( ) { let mut last_idx = first_idx ; capture_next_range ( code , & mut queue , & mut last_idx ) ; for instr in & code [ first_idx .. last_idx + 1 ] { walker ( instr ) ; } } }
This function walks the code of a single predicate, supposed to
 begin in code at the offset p. Each instruction is passed to the
 walker function.
This function walks the code of a single predicate supposed to begin in code at the offset p . Each instruction is passed to the walker function .
code
&Code
p
usize
walker
impl FnMut(&Line)
code
&Code
p
usize
walker
impl FnMut(&Line)