Given this function (btw, should I say it's defined by cases? How do I refer to functions defined like this?),
f :: Int -> Int -> Int
f 0 x = x
f x _ = x
I'm wandering what is the reason, if one exists, why I cannot write it like this:
f :: Int -> Int -> Int
f 0 x = x
f = const
Indeed, upon trying to use this, I get this error
Equations for ‘f’ have different numbers of arguments
which does seem obvious to me, as f = const
is not incompatible with f
taking two arguments (or any number of argumnts, fwiw; well, all functions take one argument and give back a function, right?).