[Haskell-cafe] Basic problem in Haskell language design?
anotheraddress at gmx.de
Mon Mar 2 03:19:45 EST 2009
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
movesFromWord8s x = case x of
f:t:ws -> (f, t) : movesFromWord8s ws
_ -> 
(at the cost of one extra variable name :))
More information about the Haskell-Cafe