[Jprogramming] all pairs
June Kim
juneaftn at gmail.com
Sat Feb 10 01:11:01 HKT 2007
Thank you for interesting approaches, but those aren't what I was expecting.
What I meant was "2 combination N"; compare the # of results of mine
and yours. Sorry if my description wasn't clear.
Following is one more approach I found:
ut=:[: -. >/~@i.
([: > ([:, at ut {.@$) # [: ,@{ 2 $ < ) 'abcd'
aa
ab
ac
ad
bb
bc
bd
cc
cd
dd
2007/2/10, Miller, Raul D <rdmiller at usatoday.com>:
> Here's some other approaches:
>
> ,/ f"0/~ 'abcd'
> f/&>,{;~ 'abcd'
>
> also (for boxed args):
> f/&>,{,&<~ 'abcd'
> f/&>,{(;<) 'abcd'
>
> --
> Raul
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
More information about the Programming
mailing list