1.Write a simple function that calculates the sum of a list of integers. e.g. (sum (5 4 6)) returns 15. Implement a non-tail-recursive solution and a tail-recursive solution.
2.Write a Scheme max function that finds the largest number. The input should be a list of integers. The logic as is discussed as follows.
boolean max(lst){
if (lst has only one element){
return the one element in lst
}
else if (car(lst) > max(cdr(lst))) {
return car(lst)
}
else {
return max(cdr(lst))
}
}