Closed lrvideckis closed 1 month ago
So a fn type can't access anything in surrounding scope, but a closure can.
fn
And Fn is the way to declare the signature of the closure
Fn
Using generic types (e.g. F) is a way to store a closure as a struct member
F
feel free to shoot this one down from previous reasons
So a
fn
type can't access anything in surrounding scope, but a closure can.And
Fn
is the way to declare the signature of the closureUsing generic types (e.g.
F
) is a way to store a closure as a struct member