[Jprogramming] RE: }

Andrew Nikitin nsg21 at hotmail.com
Sat Jul 22 02:18:04 HKT 2006


Brewer, Andrew:
>R.E.,
>I've found { kind or useful for working with amend, but keeping the array 
>structure intact (maybe helpful for amend in-place?)
>
>For example:
>
>    indexes =. , @ { @: (i.each) @ $
>    ] a =: 5 9 $ '-'
>    ] b =: ? ($a) $ 2
>    ] a =: '*' ( (,b) # indexes a ) } a
>***--***-
>**---**--
>---*--*--
>*-***--**
>**-*-****

In this specific case is no need for special 'indexes' verb; i. will do just
fine (with some magic):

   '#' ( b #&, i.$ a )"_ } a
----##--#
#-##-##--
###--####
#--#-#-#-
-####---#




More information about the Programming mailing list