If you want your type to always act as a scalar, you can tell the broadcasting machinery to do that:
Broadcast.broadcastable(mp::MyParams) = Ref(mp)
Then myf.(range, p) should work.
BTW, it’s a strong convention in Julia to make type names UpperCamelCase. So for clarity, you should probably call your type MyParams instead of myParams.