2
$\begingroup$

This question already has an answer here:

Consider the following function which takes 10 arguments.

f[Io_, {θ_, ϕ_}][{x0_, y0_, z0_}, d_][h_][L_][ω_]

I know that all of these are of same type. I would like to apply type checking, say NumericQ, to every argument. Currently, I do it like this by explicitly typing NumericQafter every argument.

f[Io_?NumericQ, {θ_?NumericQ, ϕ_?NumericQ}][{x0_?NumericQ, y0_?NumericQ, z0_?NumericQ}, d_?NumericQ]
[h_?NumericQ][L_?NumericQ][ω_?NumericQ]

Is there a simpler way to apply type checking for every argument?

$\endgroup$

marked as duplicate by Kuba Jan 15 '18 at 7:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.