Author: | Jon |
---|---|
Mode: | factor |
Date: | Tue, 27 Jul 2010 13:49:09 |
! See http://re-factor.blogspot.com/2010/07/new-combinatoric-functions.html : selections ( seq n -- selections ) swap <array> [ ] product-map ; ! Or if you don't need an array : : selections ( seq n -- selections ) swap <array> <product-sequence> ;