I decided to post this question and this personal answer as this could be helpful to other people wishing to do the same thing.
I was wondering how to get a non-zero output of all parts of a compound expression. By default, only the result of the last part of a compound expression is generated, for example:
fun1[expr_] : = (expr + x; expr + y; expr + z) fun1[a]
a + z
fun1p: = (# + x; # + y; # + z) & fun1p[a]
a + z
We could use Print (or Echo) …
fun2[expr_] : = (Print[expr + x]; Impression[expr + y]; Impression[expr + z]) out2 = fun2[a]
a + x
a + y
a + z
… but the output has Null content:
The same result is obtained using Print with a pure function.
There are workarounds, but sometimes I find it very convenient to get the outputs directly.
NOTE: There is no duplication of compound statements and previous results returned in parentheses () because the PO was trying to print the results (which displays the results, but the content is Null), whereas I (as explained above) want to: actually get the results (such as I can assign them to variables).