A good APL-style solution.

If only we could change the fill element with a hook into !.(Custom)...

   a expand!._1 b
1 2 _1 3 _1 4

------------------------------------------------------------------------
|\/| Randy A MacDonald   | APL: If you can say it, it's done.. (ram)
|/\| [EMAIL PROTECTED]  |
|\ |                     | The only real problem with APL is that
BSc(Math) UNBF'83        | it is "still ahead of its time."
Sapere Aude              |     - Morten Kromberg
Natural Born APL'er      | Demo website: http://156.34.89.225/
-----------------------------------------------------(INTP)----{ gnat }-

----- Original Message ----- 
From: "M.Shimura" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, January 10, 2007 3:54 AM
Subject: [Jprogramming] Re: Programming Digest, Vol 16, Issue 23


> I usually using this script
> 
>  expand=:4 : '((I. x) i. i. # x){y,0'
>    a
> 1 1 0 1 0 1
>    b
> 1 2 3 4
>    a expand b
> 1 2 0 3 0 4
>   
>  as same as  bit of a and number of b
> 
>  masato Shimura (Japan APL Association) 
> ----------------------------------------------------------------------
> 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