Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SecondBridge/Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "typelift/Swiftz" >= 0.5.0
5 changes: 0 additions & 5 deletions SecondBridge/Podfile

This file was deleted.

85 changes: 52 additions & 33 deletions SecondBridge/SecondBridge.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions SecondBridge/SecondBridge.xcworkspace/contents.xcworkspacedata

This file was deleted.

4 changes: 2 additions & 2 deletions SecondBridge/SecondBridge/Data/ArrayT.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ extension ArrayT : SequenceType {
public func generate() -> Generator {
var index : Int = 0

return anyGenerator {
return AnyGenerator {
if index < self.internalArray.count {
let result = self.internalArray[index]
index++
index += 1
return result
}
return nil
Expand Down
6 changes: 3 additions & 3 deletions SecondBridge/SecondBridge/Data/Map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ extension Map : SequenceType {
public func generate() -> Generator {
var index : Int = 0

return anyGenerator {
return AnyGenerator {
if index < self.internalDict.count {
let key = Array(self.internalDict.keys)[index]
index++
index += 1
return (key, self.internalDict[key]!)
}
return nil
Expand Down Expand Up @@ -98,7 +98,7 @@ extension Map : Traversable {
case let sameTypeValue as Value: let key = HashableAny(intValue: index); result = result + (key, sameTypeValue)
default: break
}
index++
index += 1
}
return result
}
Expand Down
2 changes: 1 addition & 1 deletion SecondBridge/SecondBridge/Data/Stack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extension Stack : SequenceType {
public func generate() -> Generator {
let index : Int = 0

return anyGenerator {
return AnyGenerator {
if index < self.internalArray.count {
return self.internalArray[index]
}
Expand Down
8 changes: 4 additions & 4 deletions SecondBridge/SecondBridge/Data/Vector.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ extension Vector : SequenceType {
public func generate() -> Generator {
var index : Int = 0

return anyGenerator {
return AnyGenerator {
if index < self.count {
let result = self[index]
index++
index += 1
return result
}
return nil
Expand Down Expand Up @@ -414,8 +414,8 @@ public class VectorCaseGen<T> {


protocol VectorCase {
typealias ItemType
typealias SelfType
associatedtype ItemType
associatedtype SelfType

subscript(i: Int) -> Vector<ItemType>.Array1 { get }
func update(i: Int, obj: ItemType) -> SelfType
Expand Down
4 changes: 2 additions & 2 deletions SecondBridge/SecondBridge/Protocols/Traversable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Swiftz
Datatypes conforming to this protocol should expose certain functions that allow to traverse through them, and also being built from other Traversable types (although the latter has some limitations due to Swift type constraints restrictions). All Traversable instances have access to the methods declared in this protocol.
*/
public protocol Traversable {
typealias ItemType
associatedtype ItemType

/**
Traverse all items of the instance, and call the provided function on each one.
Expand Down Expand Up @@ -177,7 +177,7 @@ public func foldLeftT<S: Traversable, U>(source: S, initialValue: U, combine: (U
var result = initialValue
while(index >= 0) {
result = combine(result, array[index])
index--
index -= 1
}
return result
}
Expand Down