On Thu, Aug 24, 2017 at 5:14 PM wrote:
> func (r genType1) f(x, y genType2) (z getType2, err
> error)
>
>
In a language such as OCaml, you would define `f` as:
let f r (x, y) = ...
And the system would infer the type of `f` automatically. In your case it
A lot of people like Go because code is very readable even for beginners.
func f(x, y int)
f is a function that receives x and y as int parameters, returning nothing.
Simple enough.
func f(x, y int) int
f is a function that receives x and y as int parameters, returning yet
another int. Fine.