         ) -> SinqSequence<R>
     {
         return SinqSequence<R> { () -> GeneratorOf<R> in
-            var innerGrouping = Dictionary<K, S.GeneratorType.Element[]>()
+            var innerGrouping = Dictionary<K, [S.GeneratorType.Element]>()
             for element in inner {
                 let key = innerKey(element)
                 if var group = innerGrouping[key] {

    {
        return SinqSequence<R> { () -> GeneratorOf<R> in

            var innerGrouping = Dictionary<K, S.GeneratorType.Element[]>()
            for element in inner {
                let key = innerKey(element)
                if var group = innerGrouping[key] {

    // O(N^2) :(
    func distinct(equality: (T, T) -> Bool) -> SinqSequence<T> {
        return SinqSequence { () -> GeneratorOf<T> in
            var uniq = [T]()
            var g = self.generate()
            return GeneratorOf {
                while let e = g.next() {
