Chapter: 7. Functions

7.1 Min

Write a function named min2 that takes two Int values, a and b , and returns the smallest one. Use _ to ignore the external parameter names for both a and b.

7.2 Last digit

Write a function that takes an Int and returns it’s last digit. Name the function lastDigit Use _ to ignore the external parameter name.