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