ArmanriazirustClosuresanonymouslambdaloosely

Closures are also known as anonymous functions and lambda functions. 
(|...|) followed by curly brackets ({...}). The pair of vertical bars lets you define arguments. Lambda functions in Rust can read variables from within their scope. These are closures.
Unlike regular functions, lambda functions cannot be defined in global scope(out of main).
ArmanRiazi