Why not  42 (<1 3)} T   ?

R.E. Boss


> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED] [mailto:programming-
> [EMAIL PROTECTED] Namens Mark D. Niemiec
> Verzonden: donderdag 3 januari 2008 4:21
> Aan: [email protected]
> Onderwerp: Re: [Jprogramming] Update a 2-D array in-place?
> 
> "Yuvaraj Athur Raghuvir" <[EMAIL PROTECTED]> wrote:
> > I have a 2-D array T. I want a verb update as follows:
> > (i;j;val) update T
> 
> Have you looked at } Amend? It replaces values using the same indexing
> options as { From.
> Furthermore, expressions of the form 'y =: x m} y'
> are done in place, much like APL's 'y[m] <- x'
> To replace a single value, use scatter indexing:
> 
>    [T =: 4 4 $ ?~ 16
>  6 11  0  5
> 13  7  1  9
>  8  4  2  3
> 10 12 15 14
> 
>    [T =: 42 (<1;3)} T
>  6 11  0  5
> 13  7  1 42
>  8  4  2  3
> 10 12 15 14
> 
> -- Mark D. Niemiec <[EMAIL PROTECTED]>
> 
> ----------------------------------------------------------------------
> 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