You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be backward compatible since no existing user code can contain R. (or whatever new adverb spelling/inflection is chosen), as it would've been a spelling error.
The following provides a motivation:
ap =: {{y`:6>x}}`{{y`:6&>/x}}@.(2=#@[)
r =: ($: 2&}.)`(ap 1&{)@.(ap {.)`ap@.(1=#@])
Cond=: {{< :(,&<) r m"_}}
Here the recursive subexpression r is defined on its own line just because we don't want the < :(,&<) part of Cond to be part of the recursion; but r is not a very natural expression to separate from Cond and assign to a name.
Ideally this would be written inline using a recursion scoping adverb R.:
where the scope of $: is limited to [the verb operand to the nearest adverb R.] which contains $:. The existing definition of $: holds if its no R. is present within the largest verb containing $: within the given sentence. R. can appear in multiple places within a verb, as in
(… $: … ($: …)R. …)R.
As motivation, one of the benefits of J's terseness, and of tacit programming's absence of names, is the dispensation of the need to break up code into arbitrary (non-[conceptual/semantic]) pieces which will be used once only, and of the resulting need to create arbitrary names for these pieces. Anonymous recursion seems to be the only place where one is forced into doing so.
Z. would be my fallback naming suggestion since this adverb is like Z: in that each modifies the behavior of a particular primitive ($: and F(.:)(.:) respectively).
The text was updated successfully, but these errors were encountered:
This would be backward compatible since no existing user code can contain
R.
(or whatever new adverb spelling/inflection is chosen), as it would've been a spelling error.The following provides a motivation:
Here the recursive subexpression
r
is defined on its own line just because we don't want the< :(,&<)
part ofCond
to be part of the recursion; butr
is not a very natural expression to separate fromCond
and assign to a name.Ideally this would be written inline using a recursion scoping adverb
R.
:where the scope of
$:
is limited to [the verb operand to the nearest adverbR.
] which contains$:
. The existing definition of$:
holds if its noR.
is present within the largest verb containing$:
within the given sentence.R.
can appear in multiple places within a verb, as inAs motivation, one of the benefits of J's terseness, and of tacit programming's absence of names, is the dispensation of the need to break up code into arbitrary (non-[conceptual/semantic]) pieces which will be used once only, and of the resulting need to create arbitrary names for these pieces. Anonymous recursion seems to be the only place where one is forced into doing so.
Z.
would be my fallback naming suggestion since this adverb is likeZ:
in that each modifies the behavior of a particular primitive ($:
andF(.:)(.:)
respectively).The text was updated successfully, but these errors were encountered: