This `if` looks like a good candidate for a helper function
```
fun {LocalsIn Decls Body}
   if Decls == nil then
      Body
   else
      fLocal({DeclareAll Decls} Body unit)
   end
end
```
and then
```
Body = {LocalsIn Decls Apply}
```
I'd be surprised that you don't use this idiom at least twice.