I find it very strange for tacit code mixed with copula.
In general tacit form is functional and side effect free, so that
composition is possible but copula is special and depends side effect.

Ср, 13 июл 2016, JBeta написал(а):
> I'd suggest a new built-in conjunction.  Say 128!:6 or A:
> 
> assignwith =: 1 : 0
> (y) =: u (y~ [ ]) :: ((i.0)"1) 1
> :
> (y) =: x u (y~ [ ]) :: ((i.0)"1) 1
> )
> 
> assignwithC =: 2 : 0
> (y) =: u (y~ [ ]) :: (n"_) 1
> :
> (y) =: x u (y~ [ ]) :: (n"_) 1 
> )
> 
> the error checking (::) is there to set an initial value if the name doesn't 
> exist.
> 
>  1 , assignwith (][ +: assignwith) 2 (][ , assignwith) (][erase) 'aa'
> 1 4
> 
> The adverb version can be shortened to 
> 
> 1 : 0
> 
> (y) =: u ". y
> :
> (y) =: x u ". y
> )
> 
> 
> which is a neat feature of ".
> 
> An alternative to allow tacit definitions of assignments would be the 
> ordinary dyad:
> 
> =:: 
> 
> assign =: 4 : '(x) =: y'
> 
> the pattern ([ =:: u) or (] =:: u) would seem straightforward to "boost" with 
> special code for in place assignment.
> 
> assignwith =: (] assign (u@:".)) : (]assign (u ".)) 
> 
> 
> I imagine this as easy and very useful, especially in combination with 
> inplace improvements.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to