Created
May 17, 2013 11:37
-
-
Save tyrcho/5598540 to your computer and use it in GitHub Desktop.
Scala Import experiments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package misc; | |
import scala.LowPriorityImplicits; | |
import scala.Predef.; | |
import scala.collection.IterableLike; | |
import scala.collection.TraversableOnce; | |
import scala.collection.immutable.List; | |
import scala.collection.immutable.List.; | |
public final class ImportExperiment$ | |
{ | |
public static final MODULE$; | |
private final List<Object> data; | |
private final List<Object> copy; | |
static | |
{ | |
new (); | |
} | |
public List<Object> data() | |
{ | |
return this.data; | |
} | |
public List<Object> copy() { return this.copy; } | |
private ImportExperiment$() | |
{ | |
MODULE$ = this; | |
this.data = List..MODULE$.apply(Predef..MODULE$.wrapIntArray(new int[] { 1, 2, 3 })); | |
this.copy = data(); | |
if (copy().nonEmpty()) Predef..MODULE$.println(data().head()); else Predef..MODULE$.println(data().getClass()); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package misc | |
object ImportExperiment { | |
val data = List(1, 2, 3) | |
val copy = data | |
import data._ | |
if (copy.nonEmpty) println(head) else println(data.getClass) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment