Skip to content

Glossary: Coding Interviews in Rust

Closure

Also written: closures, |x| …

A small unnamed function written inline, such as the `|slot| slot.0` passed to `sort_by_key` or the test passed to `partition_point`.

Where the book teaches it

Related terms

sort_by_keypartition_point