文件名称:005高阶功能
文件大小:3KB
文件格式:ZIP
更新时间:2024-03-09 17:50:25
Swift
import UIKit // (Strinfg) -> Void func logToConsole(_ msg: String) { print(msg + " From Console") } func logToFile(_ msg: String) { print(msg + " From File") } func logToWindow(_ msg: String) { print(msg + " From Windows") } enum Logger { case Console, File, Windows var print: (String) -> () { switch self { case .Console: return logToConsole
【文件预览】:
005-higher-order-functions-master
----Higher-order-function.playground()
--------Contents.swift(726B)
--------contents.xcplayground(165B)
----README.md(3KB)