To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.
The body of. w {{ u }} is executed immediately, producing w. It's as if the {{u}} didn't exist.
The body of w {{ u y}} is.not executed immediately. Execution of {{u y}} produces an anonymous verb. This verb can be part of a compound, but when the body is executed, w y is executed as a new sentence, and the recursion point is set to w.
The value of $: is set in 3 places:
* when a thread is started, to the verb that is executed in the thread
* when a name is executed, to the value of the name
* when a the parser executes a verb on its noun arguments, to the value
of the verb
The value of $: is set in 3 places:
* when a thread is started, to the verb that is executed in the thread
* when a name is executed, to the value of the name
* when a the parser executes a verb on its noun arguments, to the value
of the verb
... the note you quoted, about $: not having a value till it gets arguments, is wrong.
The value of $: is set in 3 places:
* when a thread is started, to the verb that is executed in the thread
* when a name is executed, to the value of the name
* when a the parser executes a verb on its noun arguments, to the value
of the verb
Right. I think we can just amend it to say e.g. "$: is not assigned a value until the verb that contains it (whether named or anonymous) is executed on arguments". And have an example that shows that by "contains" we mean "whose (verb) value includes $:". Thus fib@<: does not contain $:, but fib does, and fib f.@<: does.So, returning to the original question of the thread, I was asserting that
for any verb g, and for the recursion scoping adverb R,
where
R=: 1 : 0
u y
:
x u y
)
then g f.R should be strictly equivalent to g. That is the substitution I'm making in the examples here, but somehow (g f.R y) produces an error where (g y) does not.
You replied that
The recursion point is pushed at the start of executing a verb fragment, or at the start of executing a name. It is popped when the execution completes.(g R) executes to produce an anonymous verb that is waiting for its noun arguments. The recursion point was pushed at the start of that execution but it is popped at the end, before the arguments have been applied. Thus, when the body of R is executed, the recursion point has been popped.You would need a scoping adverb $:: that pushes the recursion point, executes u, and then pops the recursion point. No one has ever asked for that.
Note: You mentioned (g R) here, but I was talking about (g f.R), not (g R). Maybe that created a misunderstanding.That reply still isn't making sense to me in light of this behavior:fib=: (* $:@<:)^:(1&<)R =: ]: ({{u y}} : {{x u y}}) NB. scoping adverbfib@<: 6 NB. @:<: is NOT part of the recursion120fib f.@<: 6 NB. name removed: now @:<: is part of the recursion
15
(fib f. R)@<: 6 NB. again @:<: is NOT part of the recursion
120(fib f.R@<: -: fib@<:) 6
1Your statement seemed to imply that fib f.R@<: would not be functionally equivalent to fib@<: , but this demonstrates that it is equivalent.I was merely saying that this equivalence should hold for any verb, in place of fib. Is there a case in which this equivalence (g f.R -: g) does not hold?
Somehow replacing (u f.) with u's body gives a different result; it seems they should always be strictly equivalent.
Named verb nv Is not equivalent to (nv f.) when nv contains $: . The name sets a recursion point.
I want to emphasize that what is assigned to mean is the result of parsing +/ % # . It is not the sequence +/ % #, but rather a single verb which performs the function described by the fork.