Fix bugs in test lists.spl
There were two bugs in lists.spl
: the sum
and product
functions did not check whether their argument is the empty list before calculating the sum / product. This caused them to try to get the first element from the empty list (list.hd
).