
2 Mar
2009
2 Mar
'09
3:19 a.m.
Hi, On Sunday 01 March 2009 14:26:42 Nicu Ionita wrote:
[...] movesFromWord8s (f:t:ws) = (f, t) : movesFromWord8s ws moverFromWord8s _ = [] [...] Are there possible solutions or workarounds?
for the particular problem of having to repeat the function name, you could use "case": movesFromWord8s x = case x of f:t:ws -> (f, t) : movesFromWord8s ws _ -> [] (at the cost of one extra variable name :)) Greetings, Daniel