When I use permutations
or in-permutations
I get different orderings for the permutations returned, is there some good reason for that?
From the documentation I would expect identical behaviour, it states:
(in-permutations lst)
[...] It is equivalent to (in-list (permutations l))
But that is not true, I get:
> (permutations '(1 2 3))
'((1 2 3) (2 1 3) (1 3 2) (3 1 2) (2 3 1) (3 2 1))
> (sequence->list (in-permutations '(1 2 3)))
'((3 2 1) (2 3 1) (3 1 2) (1 3 2) (2 1 3) (1 2 3))
> (reverse (sequence->list (in-permutations '(1 2 3))))
'((1 2 3) (2 1 3) (1 3 2) (3 1 2) (2 3 1) (3 2 1))
I am using a Racket v8.6.0.4 [cs] snapshot on linux, I get the same behavior with Racket v8.5 [cs].