I'm looking for a solution to avoid this:
func gen<T>(value: T) {
...
}
gen(value: { ... })
or
gen(value: { (a: Int) in ... }
...
We can constrain T to conform to some Protocoles or to be of some types or Any or AnyObject...
We can also check that T is of some Types or AnyObject at the func 1st stage.
But I didn't find any way to say: !Function or !Closure
Any ideas?