Discord is now Scala’s main chat platform. Please join us at https://discord.com/invite/scala
inbetween
lists part
prepend
operator :+
to add to the end of a list (List(1, 2, 3) :+ 4) == List(1, 2, 3, 4)
, and combine it with a fold a la List(List('f', 'o', 'o'),List('b', 'a', 'r'),List('q', 'u', 'x')).foldLeft(Nil:List[Char])((acc, cs) => acc ::: (cs :+ '\n’))
>List(f, o, o,
, b, a, r,
, q, u, x,
)
takeRightWhile
is missing too. I must have a nosy at these new collections
case x::Nil
?