ababup1192
1/8/2017 - 9:18 AM

MyIf.scala

object Main extends App {
  def myif(p: => Boolean)(thenS: => Unit)(elseS: => Unit) {
     p && {thenS; true} || {elseS; true}
  }

  myif(1 != 1){
    println("true")
  }{
    println("false")
  }
}