f=:13 : '1 (x)}y$0'
    3 5 7 f 10$0
0 0 0 1 0 1 0 1 0 0
(correct)

but
   f2=:1([)}0$~]
   3 5 7 f2 10
0 1 0 0 0 0 0 0 0 0
I can see that there are some challenges from the boxed notation returned
for f2... but wondered if there was a way to achieve this tacitly.  I'm
guessing, but f looks like it is less efficient because it resolves to 4:1
(x)}y$0.  i.e. interpret a string on-the-fly.

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

Reply via email to