2

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?

Anjan Kumar
  • 4,979
  • 1
  • 15
  • 28

0 Answers0