trait Foo {
type MyFunction = (Int,Int) => Boolean
def checkInts(f: MyFunction)
def checkInts(f: Option[MyFunction])
}
Related Contents:
- Decomposing tuples in function arguments
- Nine ways to define a method in Scala?
- Understanding implicit in Scala
- Case objects vs Enumerations in Scala
- How to get started with Akka Streams? [closed]
- What is the difference between JavaConverters and JavaConversions in Scala?
- What Scala web-frameworks are available? [closed]
- How to read environment variables in Scala
- How to write to a file in Scala?
- How does ’20 seconds’ work in Scala?
- Preferred way to create a Scala list
- How to load local file in sc.textFile, instead of HDFS
- Easy idiomatic way to define Ordering for a simple case class
- How to sort a list in Scala by two fields?
- How does type Dynamic work and how to use it?
- When to use the equals sign in a Scala method declaration?
- How do I replace a program written as a sequenced stream of state transitions with scalaz-stream?
- Load Scala file into interpreter to use functions?
- Why “avoid method overloading”?
- How to list all cassandra tables
- What does setMaster `local[*]` mean in spark?
- Can someone explain to me what the Shapeless library is for? [closed]
- What’s the difference between Unit and Nothing?
- Purpose of Scala’s Symbol? [duplicate]
- How does the Cats library in Scala relate to scalaz?
- Increment (++) operator in Scala
- What’s the current state of static analysis tools for Scala?
- Why is “Unable to find encoder for type stored in a Dataset” when creating a dataset of custom case class?
- Automatically and Elegantly flatten DataFrame in Spark SQL
- What does “
- In Scala, is there an easy way to convert a case class into a tuple?
- Scala recover or recoverWith
- What is the differences between Int and Integer in Scala?
- Scala Sets contain the same elements, but sameElements() returns false
- How to set a String in a Option[String]?
- Can we use match to check the type of a class
- scala.concurrent.blocking – what does it actually do?
- Should I use Unit or leave out the return type for my scala method?
- How to choose a random element from an array in Scala?
- How to reduce Seq[Either[A,B]] to Either[A,Seq[B]]?
- How to reload a class or package in Scala REPL?
- Scala with keyword usage
- Suppress “discarded non-Unit value” warning
- How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?
- Why is foreach better than get for Scala Options?
- Should exceptions be case classes?
- How to run external jar functions in spark-shell
- Is there a cleaner way to pattern-match in Scala anonymous functions?
- Anonymous recursive function in Scala
- How to cast Long to Int in Scala?