     ///
     /// - returns: First element of sequence. If sequence is empty `nil` is returned.
     public func first() throws -> E? {
-        return try convertToArray(max: 1).first
+        let results = convertToArray(max: 1)
+        return try elementsOrThrow(results).first
     }
 }
 

    ///
    /// - returns: Last element in the sequence. If sequence is empty `nil` is returned.
    public func last() throws -> E? {
        return try convertToArray().last
    }
}


    ///
    /// - returns: All elements of sequence.
    public func toArray() throws -> [E] {
        let results = convertToArray()
        return try elementsOrThrow(results)
    }
}

