Applying a function to a nested list
Replace[l, x_List :> F[x], All]
F[{F[{F[{a, b}], c}], d}]
Also
ClearAll[f]
f[Except[_List, x_]] := x;
MapAll[f, l]
f[{f[{f[{a, b}], c}], d}]
Another possibility, if you want just lists to acquire the F
wrapper:
l /. List -> F@*List
F[{F[{F[{a, b}], c}], d}]
F@*Reverse@Map[F@*Reverse, l, -2]
F[{d, F[{c, F[{b, a}]}]}]
Fold[F[{#2, #1}] &, Flatten[l]]
F[{d, F[{c, F[{b, a}]}]}]