closure
A small unnamed function you can write inline and store in a variable.
A closure is an anonymous function value, written with its parameters between vertical bars, that can use variables from the scope where it is written.
Examples
let double = |x| x * 2;thendouble(21)returns42; the compiler works out the type ofxfrom how the closure is used.
See also