I need to write a function in Haskell that given a list of at least 7 elements returns a tuple containing the first and seventh element.
e.g.
Prelude> take1and7 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
(1, 7)
I've tried this
take1and7 :: [a] -> (a, a)
take1and7 [a, b, c, d, e, f, g, xs] = (a, g)
But it says that it has "non-exhaustive patterns" which I don't understand