On Wed, Nov 2, 2016 at 8:03 PM, 刘桂祥 <liuguixiang...@gmail.com> wrote: > > In golang closure func ,the needed outer variable is passed by reference > > but when the variable self is a reference in example.go , the closure func > paras is *[&map[int]int,...] is so ?
I'm not completely sure what you are asking, but I think the answer is yes. > and I doubt what kind of datatype the paras in closure func? Each function that has a closure has a custom type for the closure variable. It's essentially a struct each of whose fields is a pointer to the type of the variable being closed over. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.