As the previous answers suggested, you should probably rewrite your program
as an iteration, e.g.
group(l):=
block([result],
while l <> [] do
(result: cons( [ [ l[1],l[2] ], [ l[3], l[4] ] ], result),
l:rest(l,4) ),
reverse(result) )$
There may be typos in the above, because I don't have Maxima available where
I am writing this email.
-s