Call back function

  1. You need to pass a and b to f(): f(a, b)
  2. Type of example() is func(int, int)int not func(int,int), when you declare the type of an argument, the return value has to fit as well
  3. You are trying to return the result of a function that isn’t expected to return anything when Go expects you to return an int.
3 Likes