3 ms·
It could have been add :: (Integer, Integer) -> Integer but then you couldn't write add 1 and use it as a function. And that would be just stupid,
by tome 10y ago
It could have been
add :: (Integer, Integer) -> Integer
but then you couldn't write
add 1
and use it as a function. And that would be just stupid, sorry.
- dpc_pw 10y agoIt's just a matter of syntx. After all it's rather common for people to want to do partial application to non-first argument: http://stackoverflow.com/questions/4553405/how-can-i-bind-the-second-argument-in-a-function-but-not-the-first-in-an-elegan http://stackoverflow.com/questions/4553405/how-can-i-bind-th... So something like: add 1 _ or whatever (I'm not Haskeller so hard for me to judge what exact syntax) would do. And then add _ 1 would be easily possible too.
- tome 10y agoAbsolutely, but then what would add _ (minus 1 _) mean? Not the same as let f = minus 1 _ in add _ f and things would get very weird very fast.