Coerce func to a far function that preserves its call behavior.
If it is already a far function, return it. Otherwise make and return a
new far function that wraps func and forwards calls to it. This
works even if func is already frozen. ToFarFunction is to be used
when the function comes from elsewhere under less control. For functions
you author in place, better to use Far on their function literal directly.
Coerce
func
to a far function that preserves its call behavior. If it is already a far function, return it. Otherwise make and return a new far function that wrapsfunc
and forwards calls to it. This works even iffunc
is already frozen.ToFarFunction
is to be used when the function comes from elsewhere under less control. For functions you author in place, better to useFar
on their function literal directly.