splitting.monotonic: return array from empty trends.

db4
John Benediktsson 2015-07-16 17:23:24 -07:00
parent e2703b5720
commit 59676ce68a
2 changed files with 3 additions and 1 deletions

View File

@ -30,6 +30,8 @@ USING: tools.test math arrays kernel sequences ;
{ { { 3 3 } } }
[ { 3 3 } [ = ] slice monotonic-slice [ >array ] map ] unit-test
{ { } } [ "" trends ] unit-test
{
{
T{ upward-slice { from 0 } { to 3 } { seq { 1 2 3 2 1 } } }

View File

@ -62,5 +62,5 @@ TUPLE: upward-slice < slice ;
[ stable-slices ]
[ upward-slices ] tri 3append [ from>> ] sort-with
] [
zero? [ ] [ [ 0 1 ] dip stable-slice boa ] if
zero? [ drop { } ] [ [ 0 1 ] dip stable-slice boa ] if
] if ;