13 May
2009
13 May
'09
11:22 p.m.
Nico Rolle wrote:
Hi
I tried this but it diddn't work in ghci:
import qualified Data.Map as Map
test :: Map.Map [Int] [[Int]] -> Bool test (fromList[((i:is), (j:js))]) = [i] == j
i get the : "Parse error in pattern Failed." error.
Pattern matching only works on constructors (and view patterns, but they are a bit more advanced.) I'm not sure what you are trying to accomplish, could you elaborate? Cheers, -- Jochem Berndsen | jochem@functor.nl GPG: 0xE6FABFAB