A principle of functional programming is you never modify a variable?
What Amend does is create a new variable from other existing variables?
Nothing is amended? /Erling
On 2014-07-07 23:50, Jose Mario Quintana wrote:
Erling wrote:
"
It's obviously not possible to do any amendments in tacit code? It is also
less elegant to pass these three parameters in the two arguments in tacit
code?
"
Well, Raul and I showed general verbs to perform amendments tacitly. Once
I was as puzzled as you are (were?) but I found enlightenment; maybe you
can find it as well:
http://www.jsoftware.com/pipermail/general/2000-September/004192.html
On Mon, Jul 7, 2014 at 1:53 PM, Erling Hellenäs <[email protected]>
wrote:
It's obviously not possible to do any amendments in tacit code? It is also
less elegant to pass these three parameters in the two arguments in tacit
code? Any opinions about the use of From to do the same thing?
NB. x and y are arrays of the same rank
NB. q is a boolean, also of this rank
NB. The expression merges x and y.
NB. Where q is TRUE it picks from y, otherwise x
NB. q {"0 1 x,"0 y
If q is a vector and if we actually have a variable z of rank (+/q),}.$y
we can easily create x from q#^:_1 [ z ? No use for any indexes?
/Erling
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm