I generally tend to write inline functions as closures, which I feel are a bit more flexible (you can assign to them, for example) and syntactically lightweight. One thing to note is that closures cannot have generic parameters, so you will have to write a function in this case. Another annoyance I have with closures is that they require explicit annotation of their result type if you use them to encapsulate complex initialization; I’m still convinced that the compiler does know the actual type but forces me to put it there to spite me (or, more likely, it’s required for clarity).