bill lam wrote:
> NB. v  All permutation of x. from y. (Hui)
> permc=: ([: ,/ [EMAIL PROTECTED] {"2 1 comb) f.

Here's another (more simplistic) approach:

   perm=: [: ((#~ (0: < <./"1)) ~."1)&.:>: # #: [EMAIL PROTECTED]

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

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

Reply via email to