Basically if I have a slice or array of any arbitrary functions, how can I select only the ones that return int, or select only the ones that take ints?
I figured that I would need to use the reflect package, but just reading the docs didn’t really help me figure out exactly how to do it.
This program prints the functions taking an
intas parameter or returning anint:I think the code is self explanatory