Re: [racket] question about permutation

2011-02-14 Thread Stephen Bloch
On Feb 13, 2011, at 7:42 PM, Xiaojian Wang wrote: > I want to make a permutation of a word, for example 1 2 3 > > it should return > 1 2 3 > 1 3 2 > 2 1 3 > 2 3 1 > 3 1 2 > 3 2 1 > > or > (list (list 1 2 3) > (list 1 3 2) > . > . > . This is one of my favorite h

Re: [racket] question about permutation

2011-02-13 Thread Gregory Woodhouse
You just wrote down the permutations of the set {1, 2, 3}. What was your thought process in producing this list? Sent from my iPad On Feb 13, 2011, at 4:42 PM, Xiaojian Wang wrote: > I want to make a permutation of a word, for example 1 2 3 > > it should return > 1 2 3 > 1 3 2 > 2 1 3 > 2 3

Re: [racket] question about permutation

2011-02-13 Thread Shriram Krishnamurthi
Sure. Where are your design recipe steps? 2011/2/13 Xiaojian Wang : > I want to make a permutation of a word, for example 1 2 3 > > it should return > 1 2 3 > 1 3 2 > 2 1 3 > 2 3 1 > 3 1 2 > 3 2 1 > > or > (list (list 1 2 3) >   (list 1 3 2) >     . >     . >     . > > Could you h

[racket] question about permutation

2011-02-13 Thread Xiaojian Wang
I want to make a permutation of a word, for example 1 2 3 it should return 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 or (list (list 1 2 3) (list 1 3 2) . . . Could you help me with this? ___