From b646d1e1b83df8b417cd56794e6afc56ea29455e Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 6 Apr 2013 13:06:23 -0700 Subject: [PATCH] math.combinatorics: produce type of sequence in selections. --- basis/math/combinatorics/combinatorics-tests.factor | 2 ++ basis/math/combinatorics/combinatorics.factor | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/basis/math/combinatorics/combinatorics-tests.factor b/basis/math/combinatorics/combinatorics-tests.factor index 5ae2ceffc0..89809f2d3e 100644 --- a/basis/math/combinatorics/combinatorics-tests.factor +++ b/basis/math/combinatorics/combinatorics-tests.factor @@ -79,6 +79,8 @@ IN: math.combinatorics.tests { 2 1 1 } { 2 1 2 } { 2 2 1 } { 2 2 2 } } ] [ { 1 2 } 3 selections ] unit-test +{ { "aa" "ab" "ac" "ba" "bb" "bc" "ca" "cb" "cc" } } +[ "abc" 2 selections ] unit-test { V{ { 1 2 } { 1 3 } } } [ { 1 2 3 } 2 [ { 1 } head? ] filter-combinations ] unit-test diff --git a/basis/math/combinatorics/combinatorics.factor b/basis/math/combinatorics/combinatorics.factor index c9109eb63d..69f2f2aca5 100644 --- a/basis/math/combinatorics/combinatorics.factor +++ b/basis/math/combinatorics/combinatorics.factor @@ -189,8 +189,8 @@ INSTANCE: combinations immutable-sequence