Raul wrote:
> Yes, this sounds plausible, though I wonder what would happen
> for something like:
>
> v1=: [. :: c
> v2=: $. v1
>
> Specifically, what would the scope be, for $. ?
I assume you mean $: (self reference) rather than $. (sparse). [1]
The intention is for
> v1=: [. :: c
to be equivalent to
1 : 'u"_ :: c'
(ignoring rank for now [2])
If you can argue, from my description of [. , that the equivalence doesn't
hold, I'd be interested in reading it. If you can
tighten the description of [. so that it does hold, even better.
-Dan
[1] So, to answer your question, $: v1 would be equivalent to $: 1 : 'u"_
:: c' which is $:"_ :: c . There, $: refers
to the whole verb ($:"_ :: c), which at first means it refers to $: itself,
which in turns means that given an argument, $:
will cause an infinite recursive loop, which implies it'll raise a stack error,
which will be processed by :: which effectively
means that $: refers to c (assuming c is a verb), and the result will be
c y monadically and x c y dyadically.
[2] I now realize that all verbs in the Vocabulary must specify rank -- and,
given the nature of [. and ]. as verbs, their
ranks must be infinite (to permit the verbs they refer to have any rank at
all). This is sort of how $: (and many operators)
work. So I think we'll just have to live with [.=.u"_ and the fact that
{...@[. won't be the same as {...@+. when [. is +.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm