functional programming for go