 	public static var arbitrary : Gen<ArbitraryFoo> {
 		return Gen<(Int, Int)>.zip(Int.arbitrary, Int.arbitrary).map(ArbitraryFoo.init)
 	}
+}
+
+public struct ArbitraryMutableFoo : Arbitrary {
+    var a: Int8
+    var b: Int16
+    
+    public init() {
+        a = 0
+        b = 0
+    }
+    
+    public static var arbitrary: Gen<ArbitraryMutableFoo> {
+        return Gen.compose { c in
+            var foo = ArbitraryMutableFoo()
+            foo.a = c.generate()
+            foo.b = c.generate()
+            return foo
+        }
+    }
+}
+
+extension ArbitraryMutableFoo: Equatable {}
+
+public func == (lhs: ArbitraryMutableFoo, rhs: ArbitraryMutableFoo) -> Bool {
+    return lhs.a == rhs.a && lhs.b == rhs.b
 }
 
 public struct ArbitraryLargeFoo {

	}
}

class SimpleSpec : XCTestCase {
	func testAll() {
		property("Integer Equality is Reflexive") <- forAll { (i : Int8) in

			}
		}
        
        property("composition generates high-entropy, arbitrary values")
        <- forAll(composedArbitraryLargeFoo, composedArbitraryLargeFoo) { a, b in
            return a != b
        }
	}
    
    func testComposeWithMutableType() {
        property("composition allows setting values on mutable types")
        <- (forAll { (a: ArbitraryMutableFoo, b: ArbitraryMutableFoo) in
            return a != b
        // !!!: for some reason this always gets a size of 0, so using mapSize as a hack to increase size
        }.mapSize { $0 + 100 })
    }
}

