[Haskell-cafe] argument counts...

Albert Y. C. Lai trebla at vex.net
Mon Nov 20 21:04:29 UTC 2017


On 2017-11-20 12:13 PM, Gregory Guthrie wrote:
> I have a simple function:
> 
>         revFn (x:xs) = (revFn xs) . (x:)
[...]
> 
>      revFn [] xs = xs
> 
> Now gives an error;
> 
>    “Equations for ‘revF’ have different numbers of arguments”

Please see Haskell 2010 section 4.4.3.1 "Function bindings" and look for 
"and the number of patterns in each clause must be the same".



More information about the Haskell-Cafe mailing list