Reuse Custom Function in Button already available in Workflow?

Reuse Custom Function in Button already available in Workflow?

I have a Custom Function that I use from within a Workflow.  Am I correct in my understanding that the only way to use the same Custom Function from a Button is to recreate the function in the Button Workspace (or at least create another function that in-turn calls it?)

Seems a bit ridiculous that I have to repeat code - so thought I would check if anyone knows a workaround?

Thanks Nick