The following snippet compiles and runs fine

When using as part of worksheet, i see error

Why is this please?
It's probably just a bug/missing feature.
By the way, you could write joiner like the following code to get the same behaviour, and it also will avoid the worksheet problem.
def joiner(strings: List[String], separator: String = " ") =
strings.mkString(separator)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With