 }
 
 func difference<T: CollectionType where T.Generator.Element: Equatable>(a: T, _ b: T) -> [T.Generator.Element] {
-    return transform(a, b) { (var c, a, b, e) in
+    return transform(a, b) { (c, a, b, e) in
         if !b.contains(e) {
             c.append(e)
         }

        let tmp = source[sourceIndex]
        source[sourceIndex] = source[_j]
        source[_j] = tmp
        v++
        sourceIndex--
    }
}

}

func intersection<T: CollectionType where T.Generator.Element: Equatable>(a: T, _ b: T) -> [T.Generator.Element] {
    return transform(a, b) { (c, a, b, e) in
        if b.contains(e) {
            c.append(e)
        }
