I'd have the sketch pass in the value through a constructor or configuration method, and design the sketch so that the value was only passed on once. In your example, calling funk() repeatedly from loop() doesn't make sense; it would be better called once from setup(), or pass the value in via a constructor argument.