๐Ÿค–Compiler Directives

Compilation Condition: #if

func log(_ expression: @autoclosure () -> Any) {
    // print a given expression only within debug builds
    #if DEBUG
    print(expression())
    #endif
}

Last updated