
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.

On Thu, Aug 11, 2011 at 09:37, Luca Ciciriello
Is it possible to use the pattern (x:xs) using a parallel array [::]?
If it's there at all, I would expect the syntax to be as (:) is to [,]: (:x:xs:). That said, normal arrays have no such syntax, so parallel arrays may not either. (Then again, normal arrays don't even have an equivalent of [: :]; you have to marshal/demarshal from a list.) -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (3)
-
Brandon Allbery
-
David Virebayre
-
Luca Ciciriello