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
import scalaxy.beans._ | |
new MyBean().set(foo = 10, bar = 12) |
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
for (iteration <- 0 until iterations) { | |
for (i <- 0 until n) { | |
... | |
} | |
} |
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
(0 until iterations).foreach(iteration => { | |
(0 until n).foreach(i => { | |
... | |
}) | |
}) |
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
{ | |
var iteration = 0 | |
while (iteration < iterations) { | |
var i = 0 | |
while (i < n) { | |
... | |
i += 1 | |
} | |
iteration += 1 | |
} |
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
// Only works with 2.10.0+ | |
scalaVersion := "2.10.0" | |
// Dependency at compilation-time only (not at runtime). | |
libraryDependencies += "com.nativelibs4java" %% "scalaxy-loops" % "0.3-SNAPSHOT" % "provided" | |
// Scalaxy/Loops snapshots are published on the Sonatype repository. | |
resolvers += Resolver.sonatypeRepo("snapshots") |
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
import scalaxy.loops._ | |
for (iteration <- 0 until iterations optimized) { | |
for (i <- 0 until n optimized) { | |
... | |
} | |
} |
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
assert(a == b, "a == b (" + a + " != " + b + ")") |
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
assert(a == b, s"a == b ($a != $b)") |
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
import scalaxy.debug._ | |
val a = 10 | |
val b = 12 | |
assert(a == b) | |
// this will throw: | |
// "assertion failed: a == b (10 != 12)" |
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
// Only works with 2.10.0+ | |
scalaVersion := "2.10.0" | |
// Dependency at compilation-time only (not at runtime). | |
libraryDependencies += "com.nativelibs4java" %% "scalaxy-debug" % "0.3-SNAPSHOT" % "provided" | |
// Scalaxy/Debug snapshots are published on the Sonatype repository. | |
resolvers += Resolver.sonatypeRepo("snapshots") |