I write as:

rdd .
  map(foo => ...) .
  reduce(_ + _)

putting the '.' at the end of each line to signal line continuation

On Wed, May 20, 2015 at 1:56 PM DuyHai Doan <[email protected]> wrote:

> Hello
>
>  Is it possible to have multi line Scala code in the notebook ?
>
> I tried:
>
>  rdd
>     .map(...)
>     .filter(...)
>     .collect()
>     .foreach(...)
>
> Every time, it does not work because the compiler complains about having
> new line in the middle of an instruction.
>
> Any idea about how to solve it ? Or is it just not possible ?
>
> Regards
>
> Duy Hai DOAN
>

Reply via email to