params [ ["_cfg", configNull, [configNull]], ["_code", {}, [{}]] ]; if (isNull _cfg) exitWith {["Provided config is null!"] call BIS_fnc_error}; [_cfg] call _code; // get children and recurse private _childCfgs = _cfg call BIS_fnc_returnChildren; { [_x, _code] call milsim_fnc_recurseSubclasses; } forEach _childCfgs;