Question: Difference between a Module/ functions structure or Functions/ module structure

Hello,

So as to build a function which gives several outputs, i have made a code with this manner :

Input:=[i1, ..., in]

Output:=proc(Input);

      export o1, o2, o3
      o1=f1(Input);
      o2=f2(Input);
      o3=f3(Input);
      end module

End proc;

By doing, output1:=Output(Input):-o1; , i obtained my result. However, as my structure begins with the procedure (proc End proc), I can't export my result in package.

For this reason, I'm thinking about changing the structure of my code by starting with the creation of the module and put all the functions inside.

Input:=[i1, ..., in]

Output:=module():

export o1,o2,o3;
option package;
o1:=proc(Input)
f1(Input);
end proc;

o2:=proc(Input)
f2(Input);
end proc;

o3:=proc(Input)
f3(Input);
end proc;
   
End module;

Can you give me your feedback on the two structures ? Do you think that the second choice Module->Functions is more appropriated ?

Thanks a lot of your help and feedback.

Please Wait...