Say we have a list in the parameter and pattern match on its head and tail separately so we use x:xs. This means that the inputs are split into a value x and a list xs.
So whatever is before the colon is treated as a single value and whatever is last in the colon notation will be the rest of the list with the single value x removed.
But what if I wanted to separate the last value from the rest of the values? It seems that this notation cant be used.
Update: i think i know how i would be able to find the last number using recursion, but is the true that you can't simply get it through some kind of pattern matching?