fn main() { fn longer<'a>(a: &'a str, b: &'a str) -> &'a str { if a.len() >= b.len() { a } else { b } } let first = String::from("north"); let second = String::from("west"); let chosen = longer(&first, &second); assert_eq!(chosen, "north"); println!("Borrowed choice: {chosen}"); }