A Cut (;.) is a convenient alternative to Take ({.) when there is a need to
ignore overtake:
4 {. i. 3
0 1 2 0
4 ];.0 i. 3
0 1 2
But is Cut's behavior consistent?:
2 ];.0 i. 2
0 1 NB. ok
2 ];.0 i. 1
0 NB. ok
2 ];.0 i. 0
|index error
| 2 ];.0 i.0
Shouldn't result be an empty list instead of error? However, the following
works:
0 ];.0 i. 0
NB. empty list, ok
--
Regards,
Igor
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm