a. Use pattern-matching with (:) and the wildcard pattern _ to define a function, myButLast
, that find the last but one element of a list. For examples;
myButLast :: [a] -> a
myButLast [1,2,3,4] = 3
myButLast ['a'..'z'] = 'y'
Note: we assume that the input list has at least two elements.