An inner function is a function defined inside another scope. In F#, it can serve as a small helper without making that helper available elsewhere. Keeping bindings local also makes it easier to see where they are used. section 3.1.3
let greetingTextWithFunction person =
let makeFullName fname sname = #1
$"{fname} {sname}" #2
let fullName = makeFullName "Frank" "Schmidt" #3
$"Greetings {fullName} from {person}."
The greeting function defines makeFullName, calls it to produce fullName, then uses the result. makeFullName is available only inside greetingTextWithFunction. section 3.1.3
An inner function can also use a value declared before it in an outer scope. Using an outer value such as city this way is called capturing it; the compiler handles the capture. The reverse does not work: a binding declared inside a scope is unavailable after that scope. section 3.1.3




