I know Maple has/had opensource ideas behind it, that's why
interface(verboseproc=3)
print(sum)
allows seing source code for function sum, but what if I want to see the source code for local procedures in Statistics module,
for example
print(Statistics[Distribution])
>proc() local T; try if type(args[1],':-ProbabilityDistribution') then if nargs=1 then return eval(args[1]) else error "invalid argument(s): %0",op(map(U->if(type(U,'last_name_eval'),eval(U),U),[args[2..-1]])) end if elif type(args[1],'function') then if nargs=1 then T:=Inventory:-NewInstance(args[1]); if T=FAIL then error "unknown distribution: %1",args[1] end if; return eval(T) else error "invalid argument(s): %0",op(map(U->if(type(U,'last_name_eval'),eval(U),U),[args[2..-1]])) end if else return DataStructure:-NewDistribution(args) end if catch: error end try end proc
I'm interested with Statistics:-Distributions:-DataStructure:-NewDistribution(args) function, unfortunatelly Statistics:-Distributions is a local variable of module Statistics and by accessing it I receive an error:
eval(Statistics:-Distributions)
> Error, Distributions is not a command in the Statistics package
How can I see the source code for function Statistics:-Distributions:-DataStructure:-NewDistribution?