fn main() { let x = min(&[1,2,3][1..4]); fn min(arr : &[i32]) -> i32 { let mut min = arr[0]; for i in 1..arr.len(){ if arr[i] < min{ min = arr[i]; } } min } }
To embed this project on your website, copy the following code and paste it into your website's HTML: