Approach to computing a value once in a library?

PeterH:
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.

I think I understand how to make the computation in the constructor, however I am not at all clear how I should declare the variable "boo" in the libby.cpp and libb.h if I take that approach. Could you provide some guidance?

Thanks