Skip to content

Instantly share code, notes, and snippets.

@bamchoh
Created January 13, 2017 22:20
Show Gist options
  • Save bamchoh/02505e37b94f3c35b1efeb2e79e4a577 to your computer and use it in GitHub Desktop.
Save bamchoh/02505e37b94f3c35b1efeb2e79e4a577 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func tap(v []int) []int {
fmt.Println(v)
return v
}
func main() {
v := []int{1, 2, 3, 4}
for i := range tap(v) {
v = append(v, i)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment