Thanks Dan.

2009/8/13 Dan Bron <[email protected]>:
>> Suppose I have some data, and some default values to
>> use in case there is no data:
>>       data =. a:,(1;2;3),a:,(3;2)
>>       fill =. 10 20 30 40 50 60 70
>> The result I want is:
>>       10;1;2;3;50;3;2
>
> I prefer the  mask}data,:fill  idiom:
>
>           (10;1;2;3;50;3;2) -: (data=a:)}data ,: <"0 fill
>        1
>
>           (10;1;2;3;50;3;2) -: data (a:={.)`]}@:(,: <"0) fill
>        1
>
> -Dan
>
> ----------------------------------------------------------------------
> 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