fn leftmost_leaf_has_property<P>(&self, op_dir: &OpDir, property_check: P) -> bool
    where
        P: Fn(HeapCellValue) -> bool,
    {
        let mut h = match self.stack_last() {
            Some(h) => h,
            None => return false,
        };

        let mut parent_spec = DirectedOp::Left(atom!("-"), OpDesc::build_with(200, FY as u8));

        loop {
            read_heap_cell!(self.heap[h],
                (HeapCellValueTag::Str, s) => {
                    read_heap_cell!(self.heap[s],
                        (HeapCellValueTag::Atom, (name, _arity)) => {
                            if let Some(spec) = fetch_atom_op_spec(name, None, op_dir) {
                                if is_postfix!(spec.get_spec() as u32) || is_infix!(spec.get_spec() as u32) {
                                    if needs_bracketing(spec, &parent_spec) {
                                        return false;
                                    } else {
                                        h = s + 1;
                                        parent_spec = DirectedOp::Right(name, spec);
                                        continue;
                                    }
                                }
                            }

                            return false;
                        }
                        _ => {
                            return false;
                        }
                    )
                }
                _ => {
                    return property_check(self.heap[h]);
                }
            )
        }
    }
/*
     * descend into the subtree where the iterator is currently parked
     * and check that the leftmost leaf is a number, with every node
     * encountered on the way an infix or postfix operator, unblocked
     * by brackets.
     */
descend into the subtree where the iterator is currently parked
and check that the leftmost leaf is a number, with every node
encountered on the way an infix or postfix operator, unblocked
by brackets.
descend into the subtree where the iterator is currently parked and check that the leftmost leaf is a number with every node encountered on the way an infix or postfix operator unblocked by brackets .
fn leftmost_leaf_has_property<P>(&self, op_dir: &OpDir, property_check: P) -> bool
    where
        P: Fn(HeapCellValue) -> bool,
    {
        let mut h = match self.stack_last() {
            Some(h) => h,
            None => return false,
        };
        let mut parent_spec = DirectedOp::Left(atom!("-"), OpDesc::build_with(200, FY as u8));
        loop {
            read_heap_cell!(self.heap[h],
                (HeapCellValueTag::Str, s) => {
                    read_heap_cell!(self.heap[s],
                        (HeapCellValueTag::Atom, (name, _arity)) => {
                            if let Some(spec) = fetch_atom_op_spec(name, None, op_dir) {
                                if is_postfix!(spec.get_spec() as u32) || is_infix!(spec.get_spec() as u32) {
                                    if needs_bracketing(spec, &parent_spec) {
                                        return false;
                                    } else {
                                        h = s + 1;
                                        parent_spec = DirectedOp::Right(name, spec);
                                        continue;
                                    }
                                }
                            }
                            return false;
                        }
                        _ => {
                            return false;
                        }
                    )
                }
                _ => {
                    return property_check(self.heap[h]);
                }
            )
        }
    }
fn leftmost_leaf_has_property < P > ( & self , op_dir : & OpDir , property_check : P ) -> bool where P : Fn ( HeapCellValue ) -> bool , { let mut h = match self . stack_last ( ) { Some ( h ) => h , None => return false , } ; let mut parent_spec = DirectedOp :: Left ( atom ! ( " " ) , OpDesc :: build_with ( 200 , FY as u8 ) ) ; loop { read_heap_cell ! ( self heap [ h ] ( HeapCellValueTag Str s ) { read_heap_cell ( self heap [ s ] ( HeapCellValueTag Atom ( name _arity ) ) { if let Some ( spec ) fetch_atom_op_spec ( name None op_dir ) { if is_postfix ( spec get_spec ( ) as u32 ) is_infix ( spec get_spec ( ) as u32 ) { if needs_bracketing ( spec parent_spec ) { return false } else { h s 1 parent_spec DirectedOp Right ( name spec ) continue } } } return false } { return false } ) } { return property_check ( self heap [ h ] ) } ) } }
descend into the subtree where the iterator is currently parked
 and check that the leftmost leaf is a number, with every node
 encountered on the way an infix or postfix operator, unblocked
 by brackets.
descend into the subtree where the iterator is currently parked and check that the leftmost leaf is a number with every node encountered on the way an infix or postfix operator unblocked by brackets .
&self
op_dir
&OpDir
property_check
P
&self
op_dir
&OpDir
property_check
P