     }
     
     private func _addLines(withOrientation orientation: LineLayer.Orientation, for positionIndexSet: _PositionIndexSet) {
+        let __lengthOf: (LineLayer) -> CGFloat = {
+            switch orientation {
+            case .horizontal:   return self._lengthFor(row:)
+            case .vertical:     return self._lengthFor(column:)
+            }
+        }()
+        
         for positionIndex in positionIndexSet {
             let lineLayer: LineLayer = LineLayer()
             

                execute($0)
            }
        })
    }
    
    func _updateLengthOf(row: LineLayer) {
        row.length = (CGFloat(self._zeroedNumOfColumns) + self._overlapFactor(for: row)) * self.columnWidth
    }
    
    func _updateLengthOf(column: LineLayer) {
        column.length = (CGFloat(self._zeroedNumOfRows) + self._overlapFactor(for: column)) * self.rowHeight
    }
    
    func _updateParallelPositionOf(row: LineLayer) {
        row.parallelPosition = (self._width() - self._lengthForRow(row)) / 2
    }
    
    func _updateParallelPositionOf(column: LineLayer) {
        column.parallelPosition = (self._width() - self._lengthForRow(column)) / 2
    }
    
    func _updateOrthogonalPositionOf(row: LineLayer) {
        row.orthogonalPosition = self._verticalAbsOffset(forGridPosition: row._positionIndex.value)
    }
    
    func _updateOrthogonalPositionOf(column: LineLayer) {
        column.orthogonalPosition = self._horizontalAbsOffset(forGridPosition: column._positionIndex.value)
    }
    
    // Private Helper Functions



// MARK: - GridLayer
// MARK: Position And Length Calculation For LineLayers
private extension GridLayer {
    func _lengthFor(row: LineLayer) -> CGFloat {
        return (CGFloat(self._zeroedNumOfColumns) + self._overlapFactor(for: row)) * self.columnWidth
    }
    
    func _lengthFor(column: LineLayer) -> CGFloat {
        return (CGFloat(self._zeroedNumOfRows) + self._overlapFactor(for: column)) * self.rowHeight
    }
    
    func _parallelPositionFor(row: LineLayer) -> CGFloat {
        return (self._width() - self._lengthFor(row: row)) / 2
    }
    
    func _parallelPositionFor(column: LineLayer) -> CGFloat {
        return (self._width() - self._lengthFor(column: column)) / 2
    }
    
    func _orthogonalPositionFor(row: LineLayer) -> CGFloat {
        return self._verticalAbsOffset(forGridPosition: row._positionIndex.value)
    }
    
    func _orthogonalPositionFor(column: LineLayer) -> CGFloat {
        return self._horizontalAbsOffset(forGridPosition: column._positionIndex.value)
    }
}


private extension GridLayer {
    func _updateLineLayers() {
        if self.gridIsShown {
