2009/4/20 Sherlock, Ric <[email protected]>:
> 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
> .........

Here is another one, rather straightforward, I think –
no rarely used or very J-specific features of J used (my
rather sketchy knowledge of the language prevents me from
using most of them anyway).

diam=: 3 : 0
  n=. (a.i.y)-64                NB. size of figure
  q=. |."1(,~n)$(1 j.n)#65}.a.  NB. L-U part
  m=. }:,|.                     NB. mirror
  m m"1 q                       NB. the whole thing
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to