I've recently started learning scala and as a part of an assignment, I need to write a function with following requirements: it has to be recursive and throw an exception in case of empty list. Tried this code, but the exception is always thrown.I've recently started learning scala and as a p