public void addFunc(Function f)
    {
        if(funcs.contains(f))
            return;
        
        funcs.add(f);
        Field[] fields = f.getClass().getFields();
        for(Field fi : fields)
        {
            if(Function.class.isAssignableFrom(fi.getType()))
            {
                Function f2 = null;
                try
                {
                    f2 = (Function) fi.get(f);
                } catch (IllegalArgumentException | IllegalAccessException ex)
                {
                    ex.printStackTrace();
                }
                
                if(f2 != null)
                    addFunc(f2);
            }
        }
    }