Nesting of a sequence of functions
Composition[f, g, g, f, g]
might be what you are looking for.
Composition[f, g, g, f, g][x]
yields f[g[g[f[g[x]]]]]
.
Nest[f@*g, f@g@##, 2] &[]
f[g[f[g[f[g[]]]]]]
Nest[f@*g, f@g@##, 2] &[x]
f[g[f[g[f[g[x]]]]]]
Also
flist = {f, g};
Nest[Last[flist = RotateLeft[flist]]@# &, g[], 5]
f[g[f[g[f[g[]]]]]]
and
(Composition @@ ConstantArray[f@*g, 3])[]
f[g[f[g[f[g[]]]]]]