Skip to content

Commit

Permalink
<Description> : Removing for each since its already in the std library.
Browse files Browse the repository at this point in the history
<Type> : fix
  • Loading branch information
Khalian committed Feb 19, 2017
1 parent fd7c88c commit 07df430
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Sources/ArrayExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,14 @@ extension Array where Element: Equatable {

extension Array {

/// EZSE: Iterates on each element of the array.
@available(*, deprecated: 1.6, renamed: "forEach(_:)")
public func each(_ call: (Element) -> Void) {
forEach(call)
}

/// EZSE: Creates an array with values generated by running each value of self
/// through the mapFunction and discarding nil return values.
@available(*, deprecated: 1.6, renamed: "flatMap(_:)")
public func mapFilter<V>(mapFunction map: (Element) -> (V)?) -> [V] {
return flatMap { map($0) }
}

/// EZSE: Iterates on each element of the array with its index. (Index, Element)
/// EZSE: Iterates on each element of the array with its index. (Index, Eforlement)
@available(*, deprecated: 1.6, renamed: "forEachEnumerated(_:)")
public func each(_ call: @escaping (Int, Element) -> Void) {
forEachEnumerated(call)
Expand Down

0 comments on commit 07df430

Please sign in to comment.