Functions

The following functions are available globally.

  • Unwrap optional value throwing valueIsNil if nil instead of causing a fatal exception like the unwrap operator does. Use like this: myvalue = try unwrap(optionalValue)

    Declaration

    Swift

    public func unwrap<T>(_ optional: T?) throws -> T