a) With a more complex type (I don't see how this would affect one more than the other)
Functional would be:
foos = map(foos, func(f Foo) Foo { return Foo{f.A * f.A, f.B * f.B} })
Iterative is:
for i, f := range foos { foos[i] = Foo{f.A * f.A, f.B * f.B} }
b) Composing various operations. Composing filter + map:
Functional would be:
x := filter(map(numbers, func(n int) int { return n * n }), func(n int) bool { return n % 2 == 0 })
Iterative is:
x := make([]int, 0); for _, n := range numbers { sq := n * n; if sq % 2 == 0 { x = append(x, sq) } }
c) Swapping the container type is just a matter of swapping "_, n := range numbers".