This question might be a bit of an overstretch, or really obvious, but I haven't been able to find an answer yet.
Is there a way to automatically view the minimum required arguments for a WL function? For example, Sin
only requires 1 argument, while Replace
requires both an expression and the list of rules. Is there a way that, for example, I can input Sin
into a function, and get back something like {Real}
, or enter Replace
, and get back {Expression, Rules}
?
I hope this makes sense - I would like to be able to automate input to any function in Mathematica, by being given the required arguments.
Thanks!
Is there a way to automatically view the minimum
You might be able to parse it out from the output ofInformation[functionName]
, It will list all the different signatures of the function there, one per line. $\endgroup$Information
has side effects and doesn't return anything. Fortunately we can scrape the side effects withBlock[{CellPrint = Sow}, Reap[Information[Replace]][[-1, 1]]]
. HoweverReplace::usage
would be an easier way to see the information your after. $\endgroup$