Question: Given a list of positive integers determine if there is an element that is either greater than its two neighbors or less than its two neighbors (a "bump"). To be clear a bump can never be the first or last item of the list because they only have one neighbor.

Your program should output one of two consistent values each corresponding to either a list with no bumps or a list with bumps. What the values are is unimportant you may choose them yourself.

This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so answers will be scored in bytes with fewer bytes being better.

Test cases
----------

```
[] -> False
[1] -> False
[1,2] -> False
[1,2,1] -> True
[1,2,2] -> False
[1,2,3] -> False
[1,2,2,1] -> False
[1,2,2,3] -> False
[1,2,1,2] -> True
[1,3,2] -> True
[3,1,2] -> True
[2,2,2] -> False

```

Answer: 
[Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 40 bytes
==================================================================================

```
MatchQ[{___,x_,y_,z_,___}/;x<y>z||x>y<z]

```

[Try it online!](https://tio.run/##y00syUjNTSzJTE78n6Zg@983sSQ5IzC6Oj4@XqciXqcyXqcqXgfIqdW3rrCptKuqqamwq7Spiv0fUJSZVxKtrKOgpKBrp6Cko5AWrRwbq6CmoO@gUF1dq6NQbQgmdBSMYLSOgiGCiSRqjCSKqgZFDskoYyjTGCFqBDW19j8A "Wolfram Language (Mathematica) – Try It Online")
[Python 2](https://docs.python.org/2/), 60 bytes
================================================

```python
lambda l:any(p>c<n or p<c>n for p,c,n in zip(l,l[1:],l[2:]))

```

[Try it online!](https://tio.run/##HcY7DoAgEAXAq7wSkm3AjqAXUQrEEElw3RgbvTx@msnIda4725b7qdW4zUtEdZEvJUPyjP2A@DQw8jdKxCiMu4iqVEfjwqt1QesmR@ETWY2GYAndrwm6PQ "Python 2 – Try It Online")

Pretty much the same thing, thought it would be shorter though...

[Python 2](https://docs.python.org/2/), 63 bytes
================================================

```python
f=lambda l:l[3:]and(l[0]>l[1]<l[2]or l[0]<l[1]>l[2]or f(l[1:]))

```

[Try it online!](https://tio.run/##K6gsycjPM/r/P802JzE3KSVRIccqJ9rYKjYxL0UjJ9og1i4n2jDWJifaKDa/SAEkYAMSsIMKpAHVGFrFamr@LyjKzCsB8qMNdRSMdBSMwaRhrOZ/AA "Python 2 – Try It Online")