I watch a lesson on Swift and there they show such an example.
func sayHi() -> String{ return "hi" } func doSmth(smth : () -> (String)){ print(smth) } doSmth(smth: sayHi()) and everything works, but when I write the same thing myself, I get this error
I understand that I have a later version of the swift than is used in the example, but then how can I betray the function as a parameter?
