In F#, a tail recursive List.filter function can be implemented like:let filter f =    let rec filterImpl f acc = function        | [] -> List.rev acc        | h :: t -> filterImpl f (if f h then h :: acc else acc) t    filterImpl f []But it can also be implemented by a closure (i.e. without passing f explicitly into filterImpl)let filter f =    let rec filterImpl acc = function        | [] -> List.rev acc        | h :: t -> filterImpl (if f h then h :: acc else acc) t    filterImpl []What is the difference and which is preferred in F# or functional programming in general?
What is the difference between explicit parameters and closures
functional programming;f#;closures
From the compiler's point of view, there's very little difference between a closed over variable and a function argument.  They are just given to the function's symbol table at different times.In general you would prefer the closure version, because it is simpler, but if it were a longer function, or shared by other functions, you might want to pull it out and just accept the extra parameter.