 //    var last: CGFloat { get }
 //    var first: CGFloat { get }
 //    func enumerated(block: (Int, CGFloat) -> Void)
-    associatedtype Difference: BernsteinPolynomial
+    associatedtype NextLowerOrderPolynomial: BernsteinPolynomial
     /// a polynomial of the next lower order where each coefficient `b[i]` is defined by `a1 * b[i] + a2 * b[i+1]`
-    func difference(a1: CGFloat, a2: CGFloat) -> Difference
+    func difference(a1: CGFloat, a2: CGFloat) -> NextLowerOrderPolynomial
     /// reduces the polynomial by repeatedly applying `difference` until left with a constant value
     func reduce(a1: CGFloat, a2: CGFloat) -> CGFloat
-    var derivative: Difference { get }
+    var derivative: NextLowerOrderPolynomial { get }
 //    init(_ d: Difference, last: CGFloat)
 //    init(first: CGFloat, _ d: Difference)
 //    func reversed() -> Self

        self.b2 = b2
        self.b3 = b3
    }
    public typealias Difference = BernsteinPolynomial2
    public var b0, b1, b2, b3: CGFloat
    public var coefficients: [CGFloat] { return [b0, b1, b2, b3] }
    public func difference(a1: CGFloat, a2: CGFloat) -> BernsteinPolynomial2 {

        let oneMinusX = 1.0 - x
        return self.reduce(a1: oneMinusX, a2: x)
    }
    var derivative: NextLowerOrderPolynomial {
        let order = CGFloat(self.order)
        return self.difference(a1: -order, a2: order)
    }
