Skip to content

Commit

Permalink
Actually
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmoz committed Feb 20, 2016
1 parent 2674d1c commit 3026a76
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Contribute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ extension Dictionary { //From SwiftCheck
extension Array {

func separated() -> Array<(Element, Element)> {
let ordinals = [Int](1 ... self.count)
let withIndex = Zip2Sequence(ordinals, self)
let withIndex: [(Int,Element)] = self.enumerate().map{ ($0.0 + 1, $0.1) }

let separated: ([Element], [Element]) = withIndex.reduce(([],[])) { acc, elem in
let (ind, value) = elem
Expand Down

0 comments on commit 3026a76

Please sign in to comment.