fn read_emotion() -> Vec<(String,f64)> { vec![
("sad".to_string(),0.75),
("angry".to_string(),0.33),
("happy".to_string(),-0.95)
]}
fn draw_emotion(emotions: Vec<(String,f64)>) {
for ref ec in &emotions {
let ref emotion = ec.0;
let confidence = ec.1;
if confidence > 0.0 { println!("{}: {}", emotion, confidence) }
else { println!("not {}: {}", emotion, confidence) }
}
}
fn main() {
draw_emotion( read_emotion() );
}