Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3928

There should be a DGM.permutations() method for Collection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7-rc-1, 1.6.7
    • 1.7-rc-2
    • None
    • None

    Description

      The following assertion should be true:

      def items = [1, 2, 3]
      assert items.permutations() == [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]] as Set
      

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: