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
def add(x: Int)(using y: Int): Int = x + y | |
given instance: Int = 10 | |
add(1) | |
add(1)(using 5) | |
//trait Show[A] { | |
// def show(x: A): String | |
//} |
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
def add(x: Int)(implicit y: Int): Int = x + y | |
implicit val instance: Int = 10 | |
add(1) | |
add(1)(5) | |
trait Show[A] { | |
def show(x: A): String | |
} |
OlderNewer