3 /:@(0} i.) 9
1 2 0 3 4 5 6 7 8

Henry Rich

On 4/29/2011 8:03 AM, Ian Clark wrote:
> My brain's a mess this morning...
>
> Let foo be a dyadic verb which simply returns i.y with the zero
> floated up to position x .
> (Forget the cases of x<1 and x>y)
>
>     foo=: 4 : '(1|.i.x) , (x}.i.y)'
>     3 foo 9
> 1 2 0 3 4 5 6 7 8
>
> That's a distressing way of doing it, but it's the best I can manage.
> There's got to be a neater solution. Using # maybe?
> ----------------------------------------------------------------------
> 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