I understand now I was just defining a verb and applying it twice in the first 
case.

Thanks everyone.
________________________________
From: Programming <programming-boun...@forums.jsoftware.com> on behalf of Louis 
de Forcrand <ol...@bluewin.ch>
Sent: Wednesday, November 20, 2019 9:52 PM
To: programm...@jsoftware.com <programm...@jsoftware.com>
Subject: Re: [Jprogramming] Explicit vs tacit with assignment

Just to correct a mistake that I always hate making:

"... for use after _its_ application ..."

Sorry for the noise,
Louis

> On 21 Nov 2019, at 03:49, Louis de Forcrand <ol...@bluewin.ch> wrote:
>
> (a,a=.?@#) is a verb, namely (?@# , ?@#). In this expression a is set to the 
> _verb_ ?@# and then train (a,a) is evaluated.
>
> In the second case a is set to the _result_ of ?@# and then (a,a) is 
> evaluated. To do this tacitly:
>
> (] , ]) @ (?@#)
>
> or more concisely
>
> ,~@?@#
>
> or equivalently (how I would write it)
>
> 2 $ ?@#
>
> As Henry said, to store an intermediate value in a verb's evaluation for use 
> _after_ it's application, you must use an explicit verb, for example:
>
> ,~ @ (3 : 'a=: y') @ (?@#)
>
> Cheers,
> Louis
>
>> On 21 Nov 2019, at 03:26, Nimp O <tr...@outlook.com> wrote:
>>
>> Hello, simple question.
>>
>> This behaviour surprised me.
>>
>>  (a,a=.?@#)'01234'
>> 2 4
>>
>>  3 : 'a,a=.?@#y' '01234'
>> 1 1
>>
>> Why a is not equal to a in the first case? How can I save the roll as an 
>> intermediate result in the tacit version?
>> Thanks.
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to