a.  Agreed, that's how I did it in messages referenced.  
            But that makes the solution longer and slower, as I 
            said.   Plus m j. -n is an elegant extension to the
            notation (which is the game we're playing here).

        b.  Quaternions :)

-Dan



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Roger Hui
Sent: Saturday, March 13, 2010 11:24 PM
To: Programming forum
Subject: Re: [Jprogramming] Request for enhancement to #

a. I note that the desired result obtains from x #&.|. y 
and x #!.f&.|. y

   1j2 3j4 5j6 #!.'.' 'abc'
a..bbb....ccccc......
   1j2 3j4 5j6 #!.'.'&.|. 'abc'
..a....bbb......ccccc

b. What happens if fills are wanted before _and_ after
the copied items?



----- Original Message -----
From: Dan Bron <[email protected]>
Date: Saturday, March 13, 2010 14:20
Subject: [Jprogramming] Request for enhancement to #
To: 'Programming forum' <[email protected]>

> In the recent Hofstadter-Conway thread, I used complex&# to 
> expand a vector.
> However, the solution was slightly complicated (and slowed) by 
> the fact that
> # only allows me to specify fills *after* an element.
> 
> It would be nice if # were extended such that if the imaginary 
> component of
> a complex argument were negative, then the fills would *precede* the
> corresponding element in the output.  That is, (m j. n)&# 
> works as it does
> today if n is positive or zero, but if n is negative then the 
> fills come
> before, not after.
> 
> I've needed this before; see, e.g. the bottom of:
> 
>   http://www.jsoftware.com/pipermail/programming/2007-
> January/004750.html
----------------------------------------------------------------------
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