By picking and choosing the bits of the posted solutions that I like best, I 
get the following:

letters=: (65}.a.)&(>:@i. {. [)  NB. mine
diag=: (= {"1 ' '&,.)&.|.        NB. Adapted from Dan's post
reflect=: |:@(, }.@|.)^:2        NB. Morten's use of power

   reflect diag letters 'E'
    A    
   B B   
  C   C  
 D     D 
E       E
 D     D 
  C   C  
   B B   
    A    

Or:

|:@(, }.@|.)^:2 (= {"1 ' '&,.)&.|. (65}.a.)&(>:@i. {. [) 'E'
|:@(, }.@|.)^:2 ({.&>~ # {. i:@#) (65}.a.)&(>:@i. {. [) 'E'
(, }.@|.)|:(|. , }.) (= {"1 ' ',.])'A'([ + i...@-.@-)&.(a.&i.) 'E'
The bit that took me the longest was to find a "nice" (short & simple) way of 
getting the letters of the alphabet up to and including y.

I found Raul's & Dan's use of Under to get around the []IO=0 issue of the 
discrepancy between the index and first y letters instructive.

Raul's use of Oblique (a verb I haven't seen used much before) was refreshing.

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

Reply via email to