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: 
[Jelly](https://github.com/DennisMitchell/jelly), 5 bytes
=========================================================

```
IṠIỊẠ

```

Returns **0** if there's a bump, **1** if not.

[Try it online!](https://tio.run/##y0rNyan8/9/z4c4Fng93dz3cteD/4fZHTWsi//@PjtVRiDYEEzpGUEoHxkeIGMNFkCQRonC9xhCGkY4BUB0A "Jelly – Try It Online")

### How it works

```
IṠIỊẠ  Main link. Argument: A (integer array)

I      Increments; take all forward differences of A.
 Ṡ     Take the signs.
       The signs indicate whether the array is increasing (1), decreasing (-1), or
       constant at the corresponding point. A 1 followed by a -1 indicates a local
       maximum, a -1 followed by a 1 a local minimum.
  I    Increments; take the forward differences again.
       Note that 1 - (-1) = 2 and (-1) - 1 = -2. All other seven combinations of
       signs map to -1, 0, or 1.
   Ị   Insignificant; map each difference d to (-1 ≤ d ≤ 1).
    Ạ  All; return 1 if all differences are insignificant, 0 if not.

```
[APL (Dyalog)](https://www.dyalog.com/), ~~15~~ ~~19~~ 20 bytes
===============================================================

*2 bytes saved thanks to @EriktheOutgolfer*

```apl
{2>≢⍵:0⋄2∊|2-/×2-/⍵}

```

[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R24RqI7tHnYse9W61MnjU3WL0qKOrxkhX//B0IAEUrAUqUnjUu4YrTcGQi0vdVp0LxFIwgpBw2hjGB6qCsYyR1cPFYXqNwbSRggGSDiAJAA "APL (Dyalog Unicode) – Try It Online")

**1** for bump, **0** for no bump.