How to export a function in bash over ssh?

I would like to write a function in bash, then export that function and execute it over ssh. Is that possible, and if yes, how? I tried #!/bin/bash function myfunc() { echo $1 } expo...