I think I understand you... The function test(conjecture) is defined in a Shared script, and I can think of the shared script as being pasted onto the front of (for instance) a trigger script I'd write. Variables & functions, then, are already defined when the trigger script starts to run.
It most likely doesn't work exactly this way, but I think the trigger script can't tell the difference. If I were to write an action script
that needed to use the same shared function, it too would work as if the shared script were glued onto the front of the action's script space, and the action script would then follow that.
This implies that all the variable names, function names, or any other names defined in all shared scripts are predefined in all the other scripts in the library, and they would all (have to) use those names to access items in the shared script. So, you could use a shared script to predefine things like...
var e = entry();
Maybe... var entries = lib().entries();
...though that's generally an extra unneeded definition in trigger scripts.
I presume that if I had 2 or more shared scripts, they would just be concatenated and effectively copied onto the front of each other non-shared script with one following the other.
It takes more words to describe than it does to do it in the first place, doesn't it? It's really simple and works, so long as the one shared "JavaScript Library" made up of the concatenation of all the shared scripts has everything I need. If I need more, I can use the Add JavaScript libraries... feature of JavaScript fields, triggers, & actions
to add other JavaScript libraries I might need that are stored elsewhere (probably in GitHub), including the JavaScript Library included in Memento called moment.min.js.
I think I got all that right. If I didn't, please let either the forum or me individually know what you believe is right, or what you've learned from your experiences.