Copula has different grammar from adverb.

However, we can define:

update=: 2 :'(m)=:(".m) v y'
plusequal=: update +
a=:5

and then
   'a' plusequal 4
9
   a
9

FYI,

-- 
Raul

On Sat, Oct 5, 2013 at 5:33 PM, Pascal Jasmin <[email protected]> wrote:
> with:
>
> assign_z_ =: 4 : '(x) =: y'
> assignwith =: 1 : ('y assign u y~';':';'y assign x u y~')
>
>
>    assignwith
> 1 : 0
> y assign u y~
> :
> y assign x u y~
> )
>
> its possible to do += type operators from c-like languages
>
> a=: 2
>    2 + assignwith 'a'
> 4
>    a
> 4
>    +: assignwith 'a'
> 8
>
> plusequal =: (+ assignwith)
>    'a' plusequal 4
> 12
>
> Is there any possibility of adopting this adverb to work with =. in user 
> definitions?
>
> so,
>
> myverb =: 3 : 0
> c =. 0
> 2 + lassignwith 'c'
> )
>
> I understand that it is not the most useful needed feature, but I'd like to 
> know if there is any possible hack for doing so.
> ----------------------------------------------------------------------
> 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