SequenceSplit[list, {a_, b_, c_} :> {{a, b}, c}]
(* {{{a, b}, c}, {{a, b}, d}, {{a, b}, e}, {{a, b}, f}, {{a, b}, g}} *)
Or
MapApply[{{#1, #2}, #3} &]@Partition[list, 3]
(* {{{a, b}, c}, {{a, b}, d}, {{a, b}, e}, {{a, b}, f}, {{a, b}, g}} *)
Or
MapThread[{{#1, #2}, #3} &, Transpose@Partition[list, 3]]
(* {{{a, b}, c}, {{a, b}, d}, {{a, b}, e}, {{a, b}, f}, {{a, b}, g}} *)
In addition, using the undocumented (but very useful) fifth argument of Padding
Partition[list, 3, 3, 1, {}, {{#1, #2}, #3} &]
(* {{{a, b}, c}, {{a, b}, d}, {{a, b}, e}, {{a, b}, f}, {{a, b}, g}} *)
Just for fun
Using Map
to replace the Head List
in the partitioned list with a 'pure' function:
Map[Replace[List :> ({{#1, #2}, #3} &)],
Partition[list, 3], {2}, Heads -> True]
(* {{a, b, c}, {a, b, d}, {a, b, e}, {a, b, f}, {a, b, g}} *)
A similar approach using MapAt
MapAt[Replace[List :> ({{#1, #2}, #3} &)],
Partition[list, 3], {All, 0}]