penultimate :: [a] -> a
penultimate xs
    | n < 2     = undefined
    | otherwise = xs !! (n-2)
    where n = length xs

-- Problem 3
-- Find the K'th element of a list. The first element in the list is number 1. 
penultimate :: [a] -> a
penultimate xs
    | n < 2     = undefined
    | otherwise = xs !! (n-2)
    where n = length xs

-- Problem 3
-- Find the K'th element of a list. The first element in the list is number 1. 
penultimate xs
    | n < 2     = undefined
    | otherwise = xs !! (n-2)
    where n = length xs

-- Problem 3
-- Find the K'th element of a list. The first element in the list is number 1. 