|
|
|
|
|
by tsimionescu
1869 days ago
|
|
I wonder why auto-curried function syntax has become so ubiquitous in explaining this. For anyone coming from a more traditional CS background, it's just extra cognitive overhead in understanding the meat of the argument. For example, (a -> b,T a) -> T b
(a -> b,T<a>) -> T<b>
Is just as good in explaining what bind means as the curried version, but more familiar to the vast majority of programmers and CS graduates.Note: I do understand why auto-currying is extremely useful for doing functional programming, and I have no objections to teaching it. I just don't think it's important for teaching functors, applicatives and monads. In a separate nit-pick, these three function definitions don't mean much on their own, and there are many pure functions that satisfy them without forming a functor/applicative/monad. |
|
Probably because Haskell (and related languages) use it.
> For anyone coming from a more traditional CS background, it's just extra cognitive overhead in understanding the meat of the argument
I find that curried function signatures are slightly lower cognitive overhead after a bit of exposure, and while I can see that its the kind of thing that is likely to vary from person to person a bit, I can't see that it's likely to be a big thing either way.