fn update_predicates(state: &mut SPState, predicates: &[Variable]) {
    for v in predicates {
        if let VariableType::Predicate(p) = v.variable_type() {
            let value = p.eval(state).to_spvalue();
            if let Err(e) = state.force_from_path(v.path(), &value) {
                eprintln!(
                    "The predicate {:?} coult not be updated. Got error: {}",
                    p, e
                );
            }
        }
    }
}
/// Update the state predicate variables
/// TODO: this is very similar to the ticker code. Break out to its own crate perhaps.
Update the state predicate variables
TODO: this is very similar to the ticker code. Break out to its own crate perhaps.
Update the state predicate variables TODO : this is very similar to the ticker code . Break out to its own crate perhaps .
fn update_predicates(state: &mut SPState, predicates: &[Variable]) {
    for v in predicates {
        if let VariableType::Predicate(p) = v.variable_type() {
            let value = p.eval(state).to_spvalue();
            if let Err(e) = state.force_from_path(v.path(), &value) {
                eprintln!(
                    "The predicate {:?} coult not be updated. Got error: {}",
                    p, e
                );
            }
        }
    }
}
fn update_predicates ( state : & mut SPState , predicates : & [ Variable ] ) { for v in predicates { if let VariableType :: Predicate ( p ) = v . variable_type ( ) { let value = p . eval ( state ) . to_spvalue ( ) ; if let Err ( e ) = state . force_from_path ( v . path ( ) , & value ) { eprintln ! ( " " p e ) ; } } } }
Update the state predicate variables
TODO: this is very similar to the ticker code.
Update the state predicate variables TODO : this is very similar to the ticker code .
state
&mut SPState
predicates
&[Variable]