obtain pretty-printed form of expressions
The function print_preprocess returns the pretty-printed form of an expression, as print would display it.
In particular, procedures of the form `print/foo` are applied to functions foo(a, b, ...) and ModulePrint procedures are applied to modules. This is particularly useful when you write a `print/foo` or ModulePrint procedure and want to display a subobject.
The module m below displays in the same way as its member m:-a, but with square (list) brackets around it.
m := module()
local ModulePrint := proc()
The function foo(...) displays in reverse.
`print/foo` := proc()
local oof, i;
return oof(seq(print_preprocess([_passed][i]), i = _npassed .. 1, -1));
Download Help Document
What kind of issue would you like to report? (Optional)