 }
 
 extension Collection where Self.Index == Int, Iterator.Element: Equatable {
-  
+
   /// **Mechanica**
+  ///
+  ///  Returns the first index where the specified value appears in the collection.
+  ///  After using firstIndex(of:) to find the last position of a particular element in a collection, you can use it to access the element by subscripting.
+  /// - Parameter element: Index of the first element found (if any).
+  /// - Note: Same as `index(of:)`.
+  /// - SeeAlso: `index(of:)`
+  internal func firstIndex(of element: Iterator.Element) -> Self.Index? {
+   return index(of: element)
+  }
+
+  /// **Mechanica**
+  ///
   ///  Returns the last index where the specified value appears in the collection.
   ///  After using lastIndex(of:) to find the last position of a particular element in a collection, you can use it to access the element by subscripting.
-  /// - Parameter element: The element to find the last Index
+  /// - Parameter element: Index of the last element found (if any).
   internal func lastIndex(of element: Iterator.Element) -> Self.Index? {
-    if let idx = reversed().index(of: element) {
-      return (endIndex-1) - idx
+    for idx in stride(from: self.endIndex-1, through: 0, by: -1) {
+      guard (element == self[idx]) else { continue }
+      return idx
     }
     return nil
   }

  
  /// **Mechanica**
  ///
  /// Removes the last element that matches the given `condition`.
  @discardableResult
  internal mutating func removeLast(where predicate: (Iterator.Element) -> Bool) -> Iterator.Element? {
    guard let idx = reversed().index(where: predicate) else { return nil }
    return remove(at: (endIndex-1) - idx)
  }
  
  /// **Mechanica**
  ///
  /// Removes the last element that matches the given `condition` and returns a `new` collection.
  internal func removingLast(where predicate: (Iterator.Element) -> Bool) -> Self {
    var items = self
    items.removeLast(where: predicate)

  
  /// **Mechanica**
  ///
  /// Removes all the elements that matches the given `predicate` and returns all the removed element (if any).
  /// - Parameters:
  ///   - predicate: A closure that takes an element of the sequence as its argument and returns a Boolean value indicating whether the element is a match.
  @discardableResult
  internal mutating func removeAll(where predicate: (Iterator.Element) -> Bool) -> [Iterator.Element] {
    var removedElements: [Iterator.Element]  = []
    for idx in stride(from: self.endIndex-1, through: 0, by: -1) {
      let element = self[idx]
      guard predicate(element) else { continue }
      remove(at: idx)
      removedElements.insert(element, at: 0)
    }
    return removedElements
