[Haskell-beginners] pattern x:xs
Luca Ciciriello
luca_ciciriello at hotmail.com
Thu Aug 11 15:37:17 CEST 2011
Is it possible to use the pattern (x:xs) using a parallel array [::]?
In other words, is there a way to parallelize the code:
myfunc :: [:String:] -> [String]
myfunc [::] = []
myfunc (x:xs) = …
if I try to compile this I get the error:
Couldn't match expected type `[:String:]'
with actual type `[t0]'
In the pattern: x : xs
Is there a syntax in order to use the (x:xs) pattern?
Thanks in advance
Luca.
More information about the Beginners
mailing list