Skip to content

Instantly share code, notes, and snippets.

@bandrzejczak
Created February 9, 2018 21:52
Show Gist options
  • Save bandrzejczak/3c05676c23a71cb40007de26d8dacbc7 to your computer and use it in GitHub Desktop.
Save bandrzejczak/3c05676c23a71cb40007de26d8dacbc7 to your computer and use it in GitHub Desktop.
implicit class TernaryElseClause(elseClause: => Unit){
def ::(ifThenClause: TernaryIfThenClause) =
if(ifThenClause.cond) ifThenClause.thenClause else elseClause
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment