Roger Hui posted the following synonymous phrases:

Combinations are usually defined to have unique elements. http://www.jsoftware.com/jwiki/Essays/Combinations 
However, if non-unique is what you want: 
   f0=: (i. ([ ,. }.)&.> <@i.)
   f1=: (>:@i. @ - # i.) ,. ;@(}.&.> <)@i. 
   f2=: ,~ #: (<:/~)@i. #&, i.@,~ 
   f3=: (<:/"1 # ]) @ (,~ #: i.@*:) 

The following all produce the same result:

   ; f0 4
   f1 4
   f2 4
   f3 4

The output for all of the above is:

0 0
0 1
0 2
0 3
1 1
1 2
1 3
2 2
2 3
3 3

The beginning of the discussion thread in which these were posted is:

June Kim, Feb 10, 2007 all pairs

TracyHarms/notebook/nonuniquecombos (last edited 2008-12-08 10:45:28 by )