If the specs are allowed to "flex" then I find
the following display more pleasing:
3 3$,a:,.<"2({.,': ',}.\:b i.}.)/.&(r&,)/"2]1|:
(4 13$?~52){>,{'r b'=.;:'SHDC 23456789TJQKA'
101 chars.
f3=: 3 : 0
'r b'=.;:'SHDC 23456789TJQKA'
d=. 1|:(4 13$?~52){>,{r;b
e=. ({.,': ',}.\:b i.}.)/.&(r&,)/"2 d
3 3$,a:,.<"2 e
)
----- Original Message -----
From: "Miller, Raul D" <[EMAIL PROTECTED]>
Date: Tuesday, August 29, 2006 11:14 am
Subject: RE: [Jprogramming] Dealing a bridge hand
> Roger Hui wrote:
> > ({.&> ({.,': ',}.\:b i.}.)/.&(r&,)"1 {:&>) d
>
> This seems shorter:
> ({.,': ',}.\:b i.}.)/.&(r&,)"1/ >&.|: d
>
> > ,/,./"3 (3 3$,0,.1+i.4){' ',e
>
> I'd leave off that final ,/
>
> The ,/ gets rid of some blank lines in the display, but those
> blank lines are present in the "specification".
>
> These trivial changes brings it down to 104 characters:
>
> ,./"3(3 3$,0,.1+i.4){' ',({.,': ',
> }.\:b i.}.)/.&(r&,)"1/>&.|:_13]\(?~52){
> ,{'r b'=.;:'SHDC 23456789TJQKA'
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm