I saw some source code in github, like this: functional-swift
We can see there's definition of a struct called Ship, and there're some variable in it. From the following code we can see that there're also some function in it. It is written in the following style:
struct xxx {
}
extension xxx {
func yyy() {}
}
I can also definite the struct in the following style:
struct xxx {
func yyy() {}
}
So what the different of the two style? Is there a swift programming style guide?