I have to a data Student and a type Class:
data Student = Student {nome :: String
, stdNumber :: Int
, approvedClass :: Int
, failedClass :: Int
}
type Class = [Student]
and I'm trying do add to the approvedClass number and failed of a Student but i'm don't know how to do it . I already have this:
addClasses :: Student-> Int -> Int -> Student
addClasses student aC fC = (student _ _ (approvedClass+aC) (faileClass+fC))
But it doesn't work and i can't understand why? or how to make it work?