How to create a function in Julia that can accept an array or a scalar as input argument?

No, this is not required.
There is a recent thread

where there was a nice explanation about this by @bcmichael

1 Like