And how does it (or does not) correspond to "polymorphic"? Occasionally I see this notion like in: Implement and represent polyadic operations. I checked Wiktionary but it only gives a general meaning, not specific to functional programming.
It's really simple to understand.
- A function that takes zero arguments is called niladic function.
- A function that takes one argument only is called monadic function.
- A function that takes two arguments is called dyadic function.
- A function that takes three arguments it called triadic function.
- A function that takes multiple arguments is called polyadic function.
- A function that takes a variable number of arguments is called variadic function.
How does this relate to polymorphy? Imho it does not relate to polymorphy at all. I think often times polyadic and variadic are substitutable. See wikipedia for further information.
How does this relate to functional programming?
I think the following wikipedia quote sais it all:
There are many mathematical and logical operations that come across naturally as variadic functions. For instance, the summing of numbers or the concatenation of strings or other sequences are operations that can logically apply to any number of operands.