log

日記です

memo

scala> def unless(exp:Boolean)(code: => Unit) = if (!exp) code
unless: (exp: Boolean)(code: => Unit)Unit

scala> val x: Int = 20
x: Int = 20

scala> :paste
// Entering paste mode (ctrl-D to finish)

unless(x < 19) {
  println("小さい")
}

// Exiting paste mode, now interpreting.

小さい

scala>