|
Scala example source code file (nullary.scala)
The Scala nullary.scala source code
abstract class NullaryTest[T, m[s]] {
def nullary: String = "a"
val x = nullary
def nullary2: T
val x2 = nullary2
def nullary3: m[T]
val x3 = nullary3
}
class Concrete extends NullaryTest[Int, List] {
def nullary2 = 1
def nullary3 = List(1,2,3)
}
object test {
(new Concrete).nullary2
(new Concrete).nullary3
}
Other Scala examples (source code examples)Here is a short list of links related to this Scala nullary.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.