 		ini = next.1
 	}
 	return acc
-}
-
-public func shrinkIntegral<A : IntegerType>(x : A) -> [A] {
-	return unfoldr({ i in
-		if i <= 0 {
-			return .None
-		}
-		let n = i / 2
-		return .Some((n, n))
-	}, initial: x)
-}
-
-public func shrinkFloat(x : Float) -> [Float] {
-	return unfoldr({ i in
-		if i == 0.0 {
-			return .None
-		}
-		let n = i / 2.0
-		return .Some((n, n))
-	}, initial: x)
-}
-
-public func shrinkDouble(x : Double) -> [Double] {
-	return unfoldr({ i in
-		if i == 0.0 {
-			return .None
-		}
-		let n = i / 2.0
-		return .Some((n, n))
-	}, initial: x)
 }
 
 

	}
}

public func arbitraryArray<A : Arbitrary>() -> Gen<[A]> {
	return sized({ n in
		return choose((0, n)).bind { k in
			return sequence(Array(1...k).map({ _ in A.arbitrary() }))
		}
	})
}

public func withBounds<A : LatticeType>(f : A -> A -> Gen<A>) -> Gen<A> {
	return f(A.min)(A.max)
}

private func bits<N : IntegerType>(n : N) -> Int {
	if n / 2 == 0 {
		return 0

public protocol Arbitrary {
	static func arbitrary() -> Gen<Self>
	static func shrink(Self) -> [Self]
}

/// The implementation of a shrink that returns no alternatives.
public func shrinkNone<A>(_ : A) -> [A] {
	return []
}

/// Shrinks any IntegerType.
public func shrinkIntegral<A : IntegerType>(x : A) -> [A] {
	return unfoldr({ i in
		if i <= 0 {
			return .None
		}
		let n = i / 2
		return .Some((n, n))
	}, initial: x)
}


