In Non-Lexical Lifetimes: Introduction, Niko includes the following snippet:
fn get_default3<\'m,K,V:Default>(map: &\'m mut HashMap,
It is a closure with zero arguments. This is a simplified example to show the basic syntax and usage (play):
fn main() {
let c = || println!("c called");
c();
c();
}
This prints:
c called
c called
Another example from the documentation:
let plus_one = |x: i32| x + 1;
assert_eq!(2, plus_one(1));
It's a zero-argument lambda function.