Ich bekomme folgenden Fehler für die unten, nehme ich alle rekursive Fälle, Was fehlt?Haskell nicht erschöpfende Muster fehlen
Prelude> product [] =1
Prelude> product (x:xs) =x * product xs
Prelude> product [1,2,3]
*** Exception: <interactive>:48:1-30: Non-exhaustive patterns in function product
oder Sie können es als eine Zeile schreiben: 'product [] = 1; Produkt (x: xs) = x * Produkt xs' –