I am trying to copy an array of generic type using maps.
class MaObj[T](val arr : Array[T])(implicit ordering : Ordering[T]) {
val internalCopy : Array[T] = arr.map(e => e) //This line
But I run it gives an error saying
found : scala.collection.mutable.ArraySeq[T]
required: Array[T]
Note: implicit value comparison is not applicable here because it comes after the application point and it lacks an explicit result type
val internalCopy : Array[T] = arr.map(e => e)
I am not able to make sense of this.