After reviewing this code with #concatenative's RodgerTheGreat, this is what I've ended up with. ! Copyright (C) 2013 Loryn Jenkins. ! See http://factorcode.org/license.txt for BSD license. USING: kernel make shuffle sequences prettyprint ; IN: combinations : make-pairs ( seq1 seq2 -- seq-pairs ) [ [ [ swap , , ] { } make , ] cartesian-each ] { } make ; : slice-and-dice ( seq -- head-pair-seq tail-seq ) 1 cut tuck make-pairs swap ; : process ( acc seq -- acc' seq' ) [ dup length 1 = ] [ slice-and-dice [ append! ] dip process ] until ; : combinations ( seq -- seq ) V{ } clone swap process drop ; : combinations. ( seq -- ) combinations . ; Still, for the life of me, don't know why the unit tests aren't working though. Interactive testing in the listener shows that the code is working: but the unit tests are failing. ! Copyright (C) 2013 Loryn Jenkins. ! See http://factorcode.org/license.txt for BSD license. USING: tools.test combinations sets ; IN: combinations.tests : push-abcd ( -- seq ) { "a" "b" "c" "d" } ; : push-ints ( -- seq ) { 1 2 3 4 } ; { { "a" "b" } { "a" "c" } { "a" "d" } { "b" "c" } { "b" "d" } { "c" "d" } } [ { "a" "b" "c" "d" } combinations ] unit-test { { 1 2 } { 1 3 } { 1 4 } { 2 3 } { 2 4 } { 3 4 } } [ { 1 2 3 4 } combinations ] unit-test