CRM Custom Deluge Function "Composition"

CRM Custom Deluge Function "Composition"

I have an custom function `foo` in CRM automation, let's say it's attached to a workflow rule `X` in module Deals.

Now I also have another workflow rule `Y` calling another custom function `bar`.

Is it possible to call function `foo` inside `bar` at all? 
  1. /**
  2. void bar(Int deaId)
  3. */
  4. dealRecord = zoho.crm.getRecordById("Deals", dealId);
  5. // do some stuff...
  6. // now call my other custom function; pseudo code:
  7. zoho.crm.foo();
Maybe `foo` needs to be Standalone type, not Automation?

One way to solve it might be exposing the function via API and then call via API connection / REST / `invokeUrl` in the implementing function. Obviously that's quite an overkill for a simple function calling.

Thanks for helping with Deluge basics!