I have a feeling its gone forever... there's no obvious way to unappend (append 
^:_1) a list. 

so, you need to save the context:

 4 4$  (,&]/)  i. 4 4 3

or

(}: $ ,&]/@:i.) 4 4 3

----- Original Message ----
From: David Vincent-Jones <[EMAIL PROTECTED]>
To: Programming forum <[email protected]>
Sent: Monday, April 9, 2007 12:31:10 PM
Subject: RE: [Jprogramming] Singleton Reduction

Obviously I didn't fully explain myself ... try again!

         A=: ,&]/  i. 4 4 3
        $A
            16 3
Now I would like to reverse A back to $ 4 4 3

David

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David 
Vincent-Jones
Sent: Sunday, April 08, 2007 17:43
To: 'Programming forum'
Subject: RE: [Jprogramming] Singleton Reduction


How would one reverse that reduction?

$ ,&]/  i. 4 4 3
16 3

Assuming one knew the original form, from 16 3 back to 4 4 3


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bron
Sent: Sunday, April 08, 2007 16:40
To: 'Programming forum'
Subject: RE: [Jprogramming] Singleton Reduction


Leigh wrote:

>  I've noticed that with a rank adverb (i.e., ,"_1 / ) your prefered  
> solution works.

Raul countered:
>     $,/"_1]i. 1 2 3
>  1 6

Ok then:

       $ ,&]/  i. 1 2 3
    2 3


       $  ,&]/  1$'a'

       
By definition,   ,&]/   and  ,/   can't differ;  but since  ,&]/  isn't 
supported by special code, it doesn't suffer from the bug
indicated by Roger.  OTOH, since it isn't supported by special code, it is not 
as efficient as  ,/  .  But it's nearly as terse, equally understandable, and 
is, until the next release, more reliable than its optimized counterpart.

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

__________ NOD32 2173 (20070407) Information __________

This message was checked by NOD32 antivirus system. http://www.eset.com


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

__________ NOD32 2173 (20070407) Information __________

This message was checked by NOD32 antivirus system. http://www.eset.com


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to