3 ms·
even more annoyingly, you can define a function that returns it but not a function that accepts it, so you often have to jump through a lot of hoops to combine
by zem 6y ago
even more annoyingly, you can define a function that returns it but not a function that accepts it, so you often have to jump through a lot of hoops to combine higher order functions with multiple return values.
- cle 6y agoNot sure what you mean, functions can take multiple return values as arguments just fine: https://play.golang.org/p/l7s7i-QyRnM https://play.golang.org/p/l7s7i-QyRnM
- JamesSwift 6y ago_sort of_. Again, the leaky abstraction comes through when you try to add additional params in addition to the multiple return: https://play.golang.org/p/lwMBkvnaVm0 https://play.golang.org/p/lwMBkvnaVm0