args
will be a list of the arguments passed to test
. The first time you pass it three lists, so args
will be a list of those three lists. Recursively you pass it (cdr args)
, which is a list of the last two lists, so now args
is a list containing the list that has the last two lists. That is, args
is (((2 2) (3 3)))
where you want ((2 2) (3 3))
. You can fix it by applying the test
function to the list:
(apply test (cdr args))
Which, if (cdr args)
is ((2 2) (3 3))
, is the same as doing:
(test (2 2) (3 3))