Skip to content

Commit

Permalink
Make Optional extensions internal
Browse files Browse the repository at this point in the history
Required by the compiler.
  • Loading branch information
jspahrsummers committed Sep 21, 2014
1 parent c90a879 commit 1fed183
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ReactiveCocoa/OptionalExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import swiftz_core

extension Optional {
public func optional<U>(#ifNone: @autoclosure () -> U, ifSome: T -> U) -> U {
internal func optional<U>(#ifNone: @autoclosure () -> U, ifSome: T -> U) -> U {
if let value = self {
return ifSome(value)
} else {
return ifNone()
}
}

public func orDefault(defaultValue: @autoclosure () -> T) -> T {
internal func orDefault(defaultValue: @autoclosure () -> T) -> T {
return optional(ifNone: defaultValue, ifSome: identity)
}
}

0 comments on commit 1fed183

Please sign in to comment.