ether #491(2007/07/10 13:55 GMT) [ Scala ] Rating0/0=0.00
1 2 3 4 5 6 7
import scala.collection.mutable._ def uniq[T](xs: Array[T]): Array[T] = { val buffer = new ArrayBuffer[T] xs.foreach { e => if (!buffer.contains(e)) buffer + e } buffer.toArray }
Rating0/0=0.00-0+
[ reply ]
ether
#491()
[
Scala
]
Rating0/0=0.00
import scala.collection.mutable._ def uniq[T](xs: Array[T]): Array[T] = { val buffer = new ArrayBuffer[T] xs.foreach { e => if (!buffer.contains(e)) buffer + e } buffer.toArray }Rating0/0=0.00-0+
[ reply ]