



fn main() {
	// {
	// 	let r;
	// 	{
	// 		let x = 5;
	// 		r = &x;
	// 	}
	// 	println!("{}", r);
	// }


	let s1 = String::from("abcd");
	let s2 = "xyz";

	let result = longest(s1.as_str(), s2);
	println!("The longest string is {}", result);
}


fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
	if x.len() > y.len() {
		x
	} else {
		y
	}
}

