2008-04-20 01:51:10 -04:00
|
|
|
USING: columns sequences kernel namespaces arrays tools.test math ;
|
2009-08-13 20:21:44 -04:00
|
|
|
IN: columns.tests
|
2008-04-20 01:51:10 -04:00
|
|
|
|
|
|
|
! Columns
|
|
|
|
{ { 1 2 3 } { 4 5 6 } { 7 8 9 } } [ clone ] map "seq" set
|
|
|
|
|
|
|
|
[ { 1 4 7 } ] [ "seq" get 0 <column> >array ] unit-test
|
2009-10-27 23:32:56 -04:00
|
|
|
[ ] [ "seq" get 1 <column> [ sq ] map! drop ] unit-test
|
2008-04-20 01:51:10 -04:00
|
|
|
[ { 4 25 64 } ] [ "seq" get 1 <column> >array ] unit-test
|
2010-01-14 10:10:13 -05:00
|
|
|
|
|
|
|
[ { { 1 3 } { 2 4 } } ] [ { { 1 2 } { 3 4 } } <flipped> [ >array ] map ] unit-test
|