I'm attempting to replace the null elements of a Scala list with an empty value using map. I currently have:
val arr = Seq("A:B|C", "C:B|C", null)
val arr2 = arr.map(_.replaceAll(null, "") )
This gives me a NullPointerExpection. What is the best way to do this?
mapfunction, I recommend learnyouahaskell.com/higher-order-functions.