title: Swift: how to optionally pass function as parameter and invoke the function?
body: <p>How can you optionally pass in a function to another function? Concretely, assume functionA accepts as a parameter functionB. If functionB is not nil, how can you execute functionB inside of functionA?</p>