how to assign a function to a variable in swift code example Example: swift function in a variable var pendingFunction: ((Double, Double) -> Double)