I'm completely at a loss on how the addTwoNumbers function in the Swift playground code sample below can return "(+)" as a function of type (Int, Int) -> Int and later successfully add the two numbers together by simply calling "addTwoNumbers(2,2)".
I was unable to find an explanation in the Swift documentation as this creative solution seems to be absent there. I've seen StackOverflow answers post similar code out as answers to other questions, but never explained why " = (+)" works. What am I missing?
Please note: I understand operators are functions which are First Class Functions. I also understand the concept of High Order Functions. I shortened the code sample to stay on topic, which is (+).
let addTwoNumbers: (Int, Int) -> Int = (+)
print(addTwoNumbers(5,3)) //8