|
Scala example source code file (origins.scala)
The Scala origins.scala source code
import scala.tools.nsc.util.Origins
package goxbox {
object Socks {
val origins = Origins[Socks.type]("boop")
def boop(x: Int): Int = origins { 5 }
}
}
object Test {
import goxbox.Socks.boop
def f1() = 1 to 5 map boop
def f2() = 1 to 10 map boop
def f3() = 1 to 50 map boop
def main(args: Array[String]): Unit = {
f1() ; f2() ; f3()
}
}
Other Scala examples (source code examples)Here is a short list of links related to this Scala origins.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.