On Wed, Aug 17, 2011 at 6:55 AM, Alex Giannakopoulos <[email protected]> wrote: > So far I have the following, but I feel it could be tidied up a bit. > Any suggestions welcome > > filter =: 1 : #~ x > digits =: 10&#.^:_1 > distinct =: [: *./ "1 [: ~:"1 digits > distinct filter 100 101 102 103 > 102 103
filter=: 1 :'#~ x' Something ate your quotes. Also: distinct filter 100 102 4 6 102 (-: ~.)@digits"0 filter 100 102 4 6 102 4 6 You need "0 or something morally equivalent to ignore one number's length bleeding over to another number as leading digits. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
