I have the following function developed in Haskell, it performs an avg of 3 entered notes and depending on the condition it counts the elements of the list (using length), the first output of the tuple should be count( ) when the condition >= 4 and the second count( ) when it is < 4:
funcion1::[(String, Int,Int,Int)]->(Int,Int)
funcion1 ((nombre,nota1,nota2,nota3):xs) = ( if (nota1+nota2+nota3) `div` 3 >=4 then 1 + funcion1 xs else funcion1 xs ,
if (nota1+nota2+nota3) `div` 3 <4 then 1 + funcion1 xs else funcion1 xs )
However, when entering data in the input, the tuple always returns the same values for both cases (Example: When entering 3 elements with avg >= 4 and only 1 with avg < 4, the output should be (3,1) and currently it is ( 3.3).