3 ms·
Here's a more idiomatic translation of the Python code to Go, and there's no surprise to how the code behaves: https://play.golang.org/p/rpqvVDR9v8 https://pla
by betterwaytodoit 9y ago
Here's a more idiomatic translation of the Python code to Go, and there's no surprise to how the code behaves:
https://play.golang.org/p/rpqvVDR9v8 https://play.golang.org/p/rpqvVDR9v8
- s_ngularity 9y agoI was scratching my head looking at the authors code wondering why he didn't just write it exactly how you did. Although technically he was trying to get a pointer/reference to the student in the array, not a copy of its value
- sfilargi 9y agoNope, that's not what the OP is trying to do. eg: https://play.golang.org/p/kFjXSlf5fw https://play.golang.org/p/kFjXSlf5fw