splitting.monotonic: revert to previous monotonic-split (thanks @k7f!).
							parent
							
								
									6955bf1428
								
							
						
					
					
						commit
						e6f30668e1
					
				|  | @ -1,6 +1,7 @@ | |||
| IN: splitting.monotonic | ||||
| USING: tools.test math arrays kernel sequences ; | ||||
| 
 | ||||
| { { } } [ { } [ < ] monotonic-split ] unit-test | ||||
| [ { { 1 } { -1 5 } { 2 4 } } ] | ||||
| [ { 1 -1 5 2 4 } [ < ] monotonic-split [ >array ] map ] unit-test | ||||
| [ { { 1 1 1 1 } { 2 2 } { 3 } { 4 } { 5 } { 6 6 6 } } ] | ||||
|  |  | |||
|  | @ -20,7 +20,7 @@ IN: splitting.monotonic | |||
| PRIVATE> | ||||
| 
 | ||||
| : monotonic-split ( seq quot: ( obj1 obj2 -- ? ) -- newseq ) | ||||
|     [ drop { } ] [ (monotonic-split) ] if-empty ; inline | ||||
|     over empty? [ 2drop { } ] [ (monotonic-split) ] if ; inline | ||||
| 
 | ||||
| <PRIVATE | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue