type NI = Int
type Age = Int
type Balance = Int
type Person = (NI, Age, Balance)
type Bank = [Person]
sumAllAccounts :: NI -> Bank -> Int
sumAllAccounts n l = filter niMatch l
where niMatch n (a,_,_)
| n == a = True
| otherwise = False
Wenn ich diese Funktion zu starten erhalte ich eine Art FehlerHaskell Typ Fehler mit dem
couldnt match type (Person, t0, t1) -> Bool with Bool
Jedoch, wenn ich machen das, wo seine eigene Funktion funktioniert es
personNIMatchs :: NI -> Person -> Bool
personNIMatchs n (a,_,_)
| n == a = True
| otherwise = False
Bitte geben Sie die Definition von 'Bank' an. – luqui