Higher-order functions in Rust are functions that take other functions or closures as arguments or return them, enabling powerful abstractions like map, filter, and fold. You use them by passing closures (anonymous functions) to iterator methods or defining custom functions that accept function pointers or closures.
fn main() {
let numbers = vec![1, 2, 3, 4, 5];
let doubled: Vec<i32> = numbers.iter().map(|x| x * 2).collect();
println!("{:?}", doubled); // [2, 4, 6, 8, 10]
}