I only found several methods which were all unaccessible - intersperseList
.
Why isn't it accessible? Or is there somewhere a function which does the intersperse operation?
Example of functionality from ScalaZ:
scala> intersperse(List(1, 2, 3), 7)
res3: List[Int] = List(1, 7, 2, 7, 3)
Intercalate is the closest thing in cats I think: https://github.com/typelevel/cats/blob/882a67387f3c538237b0afbf9f0389ad5f34a648/core/src/main/scala/cats/Foldable.scala#L469-L498
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