3 ms·
There seem to be some problems in the examples. scala> def theSquareMullet(i:Int) = i * i theSquareMullet: (i: Int)Int scala> def theHoffSquareMullet(
by anonymoushn 13y ago
There seem to be some problems in the examples.
scala> def theSquareMullet(i:Int) = i * i
theSquareMullet: (i: Int)Int
scala> def theHoffSquareMullet({ mullet: => Int }) = mullet * mullet
<console>:1: error: identifier expected but '{' found.
def theHoffSquareMullet({ mullet: => Int }) = mullet * mullet
^
scala> def theHoffSquareMullet(mullet: => Int) = mullet * mullet
theHoffSquareMullet: (mullet: => Int)Int
scala> theSquareMullet(theHoffSquareMullet(10))
res0: Int = 10000