vendredi 11 janvier 2019

Haskell Code Non-exhaustive patterns in function

i want to get something like this

[([1],"h"),([2],"h")] = [([1,2],"h")]

hilfe2 :: ([Int],String) -> [Int]
hilfe2 (x,y) = x

hilfe3 :: [([Int],String)] -> [([Int],String)]
hilfe3 [(x,y)] = [ (foldr (++) [] (map hilfe2 ([(x,y)])), y )]

i only get the message :

Non-exhaustive patterns in function

Aucun commentaire:

Enregistrer un commentaire