Anyone know how to do broadcasting on a function with a non-iterable argument? i.e

anyone know how to do broadcasting on a function with a non-iterable argument? i.e. f(x,p) = x*p.val where p is a struct with a single value val . Thus, the desired result would be broadcasting over x and multiplying every value by val. Is there a way to do this without making the struct type of p behave like an array?

Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread.
(Original message :slack:) (More Info)

Whoops totally missed this post…

That’s the solution!