]> gitweb.factorcode.org Git - factor.git/blob - basis/columns/columns-tests.factor
Left align column headers
[factor.git] / basis / columns / columns-tests.factor
1 USING: arrays columns kernel math namespaces sequences
2 tools.test ;
3
4 ! Columns
5 { { 1 2 3 } { 4 5 6 } { 7 8 9 } } [ clone ] map "seq" set
6
7 { { 1 4 7 } } [ "seq" get 0 <column> >array ] unit-test
8 { } [ "seq" get 1 <column> [ sq ] map! drop ] unit-test
9 { { 4 25 64 } } [ "seq" get 1 <column> >array ] unit-test
10
11 { { { 1 3 } { 2 4 } } } [ { { 1 2 } { 3 4 } } <flipped> [ >array ] map ] unit-test