JuliaLang/julia — pull request #4382 by astrieanna (2013-09-27 12:42:34+00:00)
Title: Fix Permutation's `next` function to work with Filter

See https://github.com/JuliaLang/julia/issues/4381

Filter does not work properly with Permutation because the `next` function modifies its arguments.
Adding a call to `copy` fixes this by not modifying the second argument.