Using compFunc in randomCompFunc and pass argument if any to it