Hi again,
Now I'd like to remove that printing hack in my program. I knew it was a
hack and it won't help with the next bit.
In principle, I want to build a list recursively using some function to
generate each element from the previous one, up to a certain length. I tried
it with /\ but just got strange results:
(2*[)/\ 2 3 4
2 4 4
and had trouble doing it the long way:
inc2 =: 2&+
app =: (] , inc2@{:@])
app (2 4 6)
2 4 6 8
app2 =: (] , [@{:@])
inc2 app2 (2 4 6)
4 6 8 8
I don't understand what's happening here. Please help. Isn't there something
out of the box for this?
Adrian.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm