Look at that!  There's an interpreter bug:

    16b8000000000000000
9223372036854775807

So we need

   /:~&.((63 (32 b.) 1)&(22 b.)) i: 4
0 1 2 3 4 _4 _3 _2 _1

Henry Rich


On 12/12/2018 10:27 AM, R.E. Boss wrote:
That's what I found for the following problem: given an array if numbers, sort 
them in a way that the non-negative ones come first in ascending (or 
descending) order, followed by the negatives ones in ascending (or descending) 
order.
Elegance is a prerequisite.

    Foo i:4
0 1 2 3 4 _4 _3 _2 _1


R.E. Boss



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm



---
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to