Re: [Jprogramming] Multiple Takes

2019-10-21 Thread Raul Miller
You can shave a character or so off that last one (using @ instead of "1): ~.".~.@>,{4#<'0126' 0 1 2 6 12 16 21 26 61 62 126 162 216 261 612 621 10 102 106 1026 1062 120 160 1206 1260 1602 1620 20 201 206 2016 2061 210 2106 2160 260 2601 2610 60 601 602 6012 6021 610 6102 6120 620 6201 6210 (A

Re: [Jprogramming] Multiple Takes

2019-10-21 Thread Roger Hui
~. 10&#.@~.&> , { 4#<0 1 2 6 ~. ". ~."1 > , {4#<'0126' On Mon, Oct 21, 2019 at 11:46 AM Skip Cave wrote: > Wow! I hadn't really realized the power of catalogue '{'. This was a great > learning experience. Thanks to everyone for the posts. > > ... > > Is there any way to get rid of the extra 'e

Re: [Jprogramming] Multiple Takes

2019-10-21 Thread Skip Cave
Wow! I hadn't really realized the power of catalogue '{'. This was a great learning experience. Thanks to everyone for the posts. I like keeping these things in the numerical domain: 10#.>,{4#{0 1 2 6 0 1 2 6 10 11 12 16 20 21 22 26 60 61 62 66 100 101 102 106 110 111 112 116 120 121 122 126 160

Re: [Jprogramming] Multiple Takes

2019-10-21 Thread 'Jim Russell' via Programming
Very nice! I'm glad I took the time to try to understand this one. > On Oct 21, 2019, at 11:16 AM, Raul Miller wrote: > > ".>,{4#<'0126' -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Multiple Takes

2019-10-21 Thread Raul Miller
I think maybe that first one should have been ".>,{4#<'0126' 0 1 2 6 10 11 12 16 20 21 22 26 60 61 62 66 100 101 102 106 110 111 112 116 120 121 122 126 160 161 162 166 200 201 202 206 210 211 212 216 220 221 222 226 260 261 262 266 600 601 602 606 610 611 612 616 620 621 622 626 660 661 662 66

Re: [Jprogramming] Multiple Takes

2019-10-21 Thread Louis de Forcrand
Another (possibly lighter on memory) approach: ~. ; (#:i.2^4) <@(10 #. i.@!@# A. ])@# 0 1 2 6 Cheers, Louis > On 21 Oct 2019, at 01:09, Skip Cave wrote: > > Is there a less-verbose way to list all the integers (one-digit, two-digit, > three-digit, four-digit) can be formed by using the charac

Re: [Jprogramming] Multiple Takes

2019-10-21 Thread Clifford Reiter
Using Cartesian with duplicate digits ,".@:~.&>{4#<'0126' 0 1 2 6 1 1 12 16 2 21 2 26 6 61 62 6 1 1 12 16 1 1 12 16 12 12 12 126 16 16 162 16 2 21 2 26 21 21 21 216 2 21 2 26 26 261 26 26 6 61 62 6 61 61 612 61 62 621 62 62 6 61 62 6 10 10 102 106 10 10 102 106 102 102 102 1026 106 106 1062 106