??PermutationProduct

?Flat

?OneIdentity

SetAttributes[f,Flat];
f[x_] := x;

f[x,y]

SetAttributes[g,{Flat,OneIdentity}];

g[x]

g[g[x]]

SetAttributes[h,{Flat,OneIdentity}];
h[seq___] := hh[seq];
hh[] = 0;
hh[seq___,a_] := 10hh[seq]+a;

h[1,2,3]

h[1]

h[]

h[1,23]

h[h[1],h[2,3]]