有没有人知道scala中=> Unit的类型?我不知道=> Unit的含义以及如何使用它.我定义了如下函数:
def test(code: => Unit){ print("start ...") code print("end ....") } test(print(1))
它是否意味着具有返回Unit的任何参数的函数?
谢谢
types scala
scala ×1
types ×1