scala tutorial code example Example 1: scala tutorial val x = if (a < b) a else b Example 2: scala learn import cats.Semigroup