diff --git a/Box/Box.swift b/Box/Box.swift index 27044c7..491e68e 100644 --- a/Box/Box.swift +++ b/Box/Box.swift @@ -20,7 +20,7 @@ public final class Box: BoxType, Printable { public let value: T /// Constructs a new Box by transforming `value` by `f`. - public func map(f: T -> U) -> Box { + public func map(@noescape f: T -> U) -> Box { return Box(f(value)) } diff --git a/Box/BoxType.swift b/Box/BoxType.swift index 7c3c502..78a08d0 100644 --- a/Box/BoxType.swift +++ b/Box/BoxType.swift @@ -41,6 +41,6 @@ public func != (lhs: B, rhs: B) -> Bool { // MARK: Map /// Maps the value of a box into a new box. -public func map(v: B, f: B.Value -> C.Value) -> C { +public func map(v: B, @noescape f: B.Value -> C.Value) -> C { return C(f(v.value)) } diff --git a/Box/Info.plist b/Box/Info.plist index b238857..b35c271 100644 --- a/Box/Info.plist +++ b/Box/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.2.0 + 1.2.1 CFBundleSignature ???? CFBundleVersion diff --git a/Box/MutableBox.swift b/Box/MutableBox.swift index 3dca2b2..07f266e 100644 --- a/Box/MutableBox.swift +++ b/Box/MutableBox.swift @@ -15,7 +15,7 @@ public final class MutableBox: MutableBoxType, Printable { public var value: T /// Constructs a new MutableBox by transforming `value` by `f`. - public func map(f: T -> U) -> MutableBox { + public func map(@noescape f: T -> U) -> MutableBox { return MutableBox(f(value)) }