duct

2019-09-30T07:18:20.027600Z

It depends. If the function can be viewed as a module and it is used in many places — you can make it just like the handler example, i.e the multimethod that takes the dependencies and returns a function that closes over these deps. After init the system will contain this function and you can provide it as a dependency where needed. At least you should be able to do something similar to this. If the function is used in one place, I think there's no need to define it as a module.

2019-09-30T09:35:43.029100Z

@jjttjj: No, it’s like @jahson says. You should never typically access the system directly; except calling halt to shut it down, or in a dev/debugging/testing context. The whole idea is that components are injected with precisely the dependencies they need. Those dependencies include other instantiated components. I’d avoid calling these things modules though, they’re integrant components. Modules are something very different.

2019-09-30T11:00:08.029400Z

> I’d avoid calling these things modules though, they’re integrant components. Modules are something very different. Yeah, my bad.