I'm trying to find the highest 1-9 pandigital prime, so I need to get the permutations in reverse order if possible. Also, how can I apply my primeTest script to the results?
primeTest =: 3 : 'if. #@:q:y do. y end. ' This is what I have so far. The rank of y and of the list of permutations don't match up, and it feels like my 'if.' approach isnt great. Can anyone offer any advice as to how achieve this? Thanks. ___________________________ David Vaughan On 8 Jul 2011, at 11:29, Ric Sherlock <[email protected]> wrote: > (i.@!@# A. ]) 'abcd' > or > (A.~ i.@!@#) 'abcd' > > see also: > http://rosettacode.org/wiki/Find_the_missing_permutation#J > > On Fri, Jul 8, 2011 at 9:44 PM, David Vaughan > <[email protected]> wrote: >> >> How would you go about getting all the permutations of a string in J? >> ___________________________ >> >> David Vaughan >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
