(use-modules
	(srfi srfi-1)
	(ice-9 format)
)

(define (recombine right left)
	(format #t "~a\n" (string-join (map number->string left) " ")) ; trace
	
	(if (null? right) 
		#f ; if right is empty then go out
		
		(let ((tail (cdr right)) (next (cons (car right) left))) ; right & left for next step
			(recombine tail next) ; try to go deep
			(recombine tail left) ; next iteration
		)
	)
)

(recombine (list 1 2 3 4) (list))