Protocols
The following protocols are available globally.
-
Describes an object that be empty.
See morelet str = "" let retval = str.isEmpty // so something with str which is true
Declaration
Swift
public protocol Emptyable
-
Conformance to this protocol provides implementation of some of the Kotlin Scope Functions. To add conformance to your own types, see examples below.
See moreclass MyClass: ScopeFunctions {} struct MyStruct: ScopeFunctions {}
Declaration
Swift
public protocol ScopeFunctions