Add example of type inference in swift functions