scala programming tutorial for beginners code example Example: scala tutorial val x = if (a < b) a else b