Mathematica: get number of arguments passed to a function?

Posted by dbjohn on Stack Overflow See other posts from Stack Overflow or by dbjohn
Published on 2010-06-15T17:32:55Z Indexed on 2010/06/17 1:52 UTC
Read the original article Hit count: 274

Filed under:
|
|
|
|

How do I get the number of arguments passed to a function, such as Plus[2,3,4,5] has 4 arguments passed to it. I was thinking it may involve the use of the function Length and getting the arguments into a list. The intention is to iterate an operation based on the number of arguments for a function. There is probably a simple solution or function but I haven't come across it yet. Any other ways or suggestions are welcome as well?

© Stack Overflow or respective owner

Related posts about function

Related posts about count