In this small exercise you will extend functions and use extensively if-else expressions.
Scala's if-else expression is similar to Java's condition expresion: "condition ? if-value : else-value"
Extend the calculator with a signum operator
Use if-else to convert a boolean input
Use if-else to implement these boolean operations: and, or, negate
if-else expression
- Define some functions: http://www.artima.com/pins1ed/first-steps-in-scala.html#step3
- Scala if then else syntax: http://alvinalexander.com/scala/scala-if-then-else-syntax-returning-value-functional-programming