Skip to content

Instantly share code, notes, and snippets.

@lpiepiora
Last active August 29, 2015 14:14
Show Gist options
  • Save lpiepiora/8cb621d9d339b87ee360 to your computer and use it in GitHub Desktop.
Save lpiepiora/8cb621d9d339b87ee360 to your computer and use it in GitHub Desktop.
import java.io.PrintStream
def log(m: String)
(implicit o: PrintStream,
prefix: String): Unit = o.println(s"[$prefix] $m")
implicit val out: PrintStream = System.out
def ?[T](implicit w: T): T = w
log("!!! MSG !!!")(?, "prefix")
// ^-- wildcard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment