//Takes in an ArrayList
    public static int score_array(ArrayList A, boolIntFun f)
    {
        int score = 0;
        foreach ( int element in A) //I guess this line acts of a sort of type-casting , since it will iterate over A. However if there is a non-int in the array it crashes.
        {
            if (f(element)) score++;

        }
        return score;
    }
    public static int score_array(ArrayList A, boolIntFun f) //Takes in an ArrayList
    {
        int score = 0;

        foreach (int element in A)  //I guess this line acts of a sort of type-casting , since it will iterate over A. However if there is a non-int in the array it crashes.
        {
            if (f(element))
            {
                score++;
            }
        }
        return(score);
    }