Error handling with the Result type
public func equal<R, E>(
eqOk : (R, R) -> Bool,
eqErr : (E, E) -> Bool,
r1 : Result<R, E>,
r2 : Result<R, E>
) : Bool
public func compare<R, E>(
compareOk : (R, R) -> Order.Order,
compareErr : (E, E) -> Order.Order,
r1 : Result<R, E>,
r2 : Result<R, E>
) : Order.Order
public func chain<R1, R2, Error>(result : Result<R1, Error>, y : R1 -> Result<R2, Error>) : Result<R2, Error>
public func fromOption<R, E>(ok : ?R, err : E) : Result<R, E>
public func toOption<R, E>(result : Result<R, E>) : ?R
public func forEach<R, E>(result : Result<R, E>, f : R -> ())
public func assertOk(result : Result<Any, Any>)
public func assertErr(result : Result<Any, Any>)
public func fromUpper<R, E>(result : {#Ok : R; #Err : E}) : Result<R, E>
public func toUpper<R, E>(result : Result<R, E>) : {#Ok : R; #Err : E}