I have tried to write a function that takes a list pair, and swaps the pair elements
inverse :: [(a,b)] -> [(b,a)]
inverse [] = []
inverse (x,y):xs = (y:x): inverse xs
I have loaded this function via Prelude, it gives me following error:
mydefs.hs:11:1: Parse error in pattern: inverse
This is line 11, inverse (x,y):xs = (y:x): inverse xs