seq is defining i. so that is dyadic, not monadic. It is in a hook and
is equivilent to
"10 0 1 i. 10" for the data you supplied.
What you need to do is define seq so i. is monadic, has no left
argument. Try:
seq =: [: i. 0:{]
Also, it is simpler to use {. in place of the 0:{] to get the first
element. This gives:
seq =: [: i. {.
Sean McGowan wrote:
Hi there,
I'm trying to create an index the size of the first element passed into a
tacit function
but the index is always 0. I have the following:
seq =: i. 0:{]
seq 10 0 1
0
Shouldn't this be:
seq =: i. 0:{]
seq 10 0 1
0 1 2 3 4 5 6 7 8 9
?
Sean
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm