 }
 
 
-/**
-  A stepwise (lazy-ish) implementation of the Knuth Shuffle (a.k.a. Fisher-Yates Shuffle),
-  using a sequence of indices for the input. Elements (indices) from
-  the input sequence are returned in a random order until exhaustion.
-*/
+/// A stepwise (lazy-ish) implementation of the Knuth Shuffle (a.k.a. Fisher-Yates Shuffle),
+/// using a sequence of indices for the input. Elements (indices) from
+/// the input sequence are returned in a random order until exhaustion.
 
 struct IndexShuffler<I: ForwardIndexType>: SequenceType, GeneratorType
 {

      // return the new random Index.
      return i[step]
    }

    return nil
  }

  func generate() -> IndexShuffler
  {
    return self
  }
}


import Darwin

extension CollectionType
{
  /// Get a sequence/generator that will return a collection's elements in a random order.
  /// The input collection is not modified.
  ///
  /// - returns: A `PermutationGenerator` of `c`'s elements, shuffled.

  func shuffle() -> PermutationGenerator<Self, IndexShuffler<Self.Index>>
  {
    return PermutationGenerator(elements: self, indices: IndexShuffler(self.indices))
