[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.
```
[Answer]
# JavaScript (ES6), 38 bytes
Returns a boolean.
```
a=>a.some(x=n=>x*(x=a<n|-(a>(a=n)))<0)
```
### Test cases
```
let f =
a=>a.some(x=n=>x*(x=a<n|-(a>(a=n)))<0)
console.log(f([]))              // False
console.log(f([1]))             // False
console.log(f([1,2]))           // False
console.log(f([1,2,1]))         // True
console.log(f([1,2,2]))         // False
console.log(f([1,2,3]))         // False
console.log(f([1,2,2,1]))       // False
console.log(f([1,2,2,3]))       // False
console.log(f([1,2,1,2]))       // True
console.log(f([1,3,2]))         // True
console.log(f([2,0,1]))         // True
console.log(f([2,2,2]))         // False
console.log(f([-4,100000,89]))  // True
```
### How?
We use **a** to store the previous value of **n**. We set **x** to **1** if **a < n**, **-1** if **a > n** or **0** if **a = n**. And we test whether **old\_x \* x < 0**, which is only possible if (**old\_x = 1** and **x = -1**) or (**old\_x = -1** and **x = 1**).
Because **x** is initialized to the anonymous callback function of **some()**, it is coerced to **NaN** during the first iteration, which makes the test falsy.
[Answer]
# [Haskell](https://www.haskell.org/), 42 bytes
```
any(<0).f(*).f(-)
f a b=zipWith a b$tail b
```
[Try it online!](https://tio.run/##y0gszk7NyfmfbhvzPzGvUsPGQFMvTUMLROhqcqUpJCok2VZlFoRnlmSA2ColiZk5Ckn/cxMz82wLijLzSlRyEwsU0qOjY3WiDUFYxwhC6kB5cL4xjI@QgYvBdBmDaSMdA6Ca2P//ktNyEtOL/@smFxQAAA "Haskell – Try It Online")
## Explanation
First we have the function `f` that takes a binary function and a list and applies the binary function to every adjacent pair in the list.
Then our main function applies `f(-)` to the input list. This calculates the difference list. We then apply `f(*)` to the list to multiply every adjacent pair. Lastly we ask if any pair is less than zero.
A number in the end list can only be negative if it is the product of a negative and positive number from the difference list. Thus in order to produce a negative entry (and then return true) the original list must switch from increasing to decreasing or vice versa, that is it must have a bump.
[Answer]
# [Python 2](https://docs.python.org/2/), 43 bytes
```
f=lambda x,y,z,*t:0>(y-x)*(z-y)or f(y,z,*t)
```
Returns *True* if there's a bump, errors if there isn't. ([allowed by default](https://codegolf.meta.stackexchange.com/a/11908/12012))
[Try it online!](https://tio.run/##K6gsycjPM/r/P802JzE3KSVRoUKnUqdKR6vEysBOo1K3QlNLo0q3UjO/SCFNAyKh@T8NyCtRyMxTiI7VUYg2BBM6RlBKB8ZHiBjDRZAkEaJwvcYQhjFMxAhsiBUXZ0lRJZDkLCjKzCsBugPoBi7O1Irk1IIShZDKglTXoqL8IoQCt8Sc4tT/AA "Python 2 – Try It Online")
[Answer]
# [Octave](https://www.gnu.org/software/octave/) with Image Package, ~~34~~ 32 bytes
*2 bytes saved thanks to [@StewieGriffin](https://codegolf.stackexchange.com/users/31516/stewie-griffin)!*
```
@(x)0||prod(im2col(diff(x),2))<0
```
[**Try it online!**](https://tio.run/##y08uSSxL/Z9mq6en999Bo0LToKamoCg/RSMz1yg5P0cjJTMtDSiqY6SpaWPwP00jOlaTC0gaQilrIzjDGiGGLGqMJIqiBFkGyRxjGNMYIWoEMfI/AA "Octave – Try It Online")
### Explanation
Computes consecutive differences, arranges them in sliding blocks of length 2, obtains the product of each block, and tests if any such product is negative.
[Answer]
# [Perl 6](http://perl6.org/), 39 bytes
```
{so~(.[1..*]Zcmp$_)~~/'re L'|'s M'/}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/uji/TkMv2lBPTys2Kjm3QCVes65OX70oVcFHvUa9WMFXXb/2f3FipYKSSryCrZ1CdZqCSnytkkJafpFCdKyOgo2hHYhQMIJSCjA@QsQYLoIkiRCF6zWGMIwUDIDq/gMA "Perl 6 – Try It Online")
`$_` is the list argument to this anonymous function. `.[1..*]` is the same list, but with the first element dropped. `Zcmp` zips the two lists together with the `cmp` operator, resulting in a list of `Order` values. For example, for an input list `1, 2, 2, 2, 1` this would result in the list `More, Same, Same, Less`.
Now we just need to know whether that list contains two adjacent elements `More, Less` or `Less, More`. The trick I used is to convert the list to a space-delimited string with `~`, then test whether it contains either substring `re L` or `s M`. (The first one can't be just `e L` because `Same` also ends with an "e".)
The smart match operator returns either a `Match` object (if the match succeeded) or `Nil` (if it didn't), so `so` converts whatever it is into a boolean value.
[Answer]
# R, 48 bytes
```
function(x)any(apply(embed(diff(x),2),1,prod)<0)
```
[Try it online!](https://tio.run/##K/qfZvs/rTQvuSQzP0@jQjMxr1IjsaAgp1IjNTcpNUUjJTMtDSisY6SpY6hTUJSfomljoPk/TSNZw1DHCCiqyQVjG8LZhkhsIxQZIBtJjwmQZ6Kp@R8A "R – Try It Online")
How it works step-by-step using c(1,4,1,4) as example:
```
> x=c(1,4,1,4)
> diff(x)
[1]  3 -3  3
> embed(diff(x),2)
     [,1] [,2]
[1,]   -3    3
[2,]    3   -3
> apply(embed(diff(x),2),1,prod)
[1] -9 -9
> any(apply(embed(diff(x),2),1,prod)<0)
[1] TRUE
```
As a bonus, here is a solution of similar length and concept using package `zoo`:
```
function(x)any(zoo::rollapply(diff(x),2,prod)<0)
```
[Answer]
# [Haskell](https://www.haskell.org/), 33 bytes
```
f(p:r@(c:n:_))=(c-p)*(c-n)>0||f r
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P02jwKrIQSPZKs8qXlPTViNZt0BTC0jmadoZ1NSkKRT9z03MzFOwVSgoyswrUVBRSFOINtRRMNJRMAaThrH/AQ "Haskell – Try It Online")
`True` if there's a bump, errors if there's not.
[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")
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~55~~ 46 bytes
```
->a{a.each_cons(3).any?{|x,y,z|(y-x)*(y-z)>0}}
```
[Try it online!](https://tio.run/##TY5LDoMwDET3OYWXpDKoJGvoQVBUJaiIDR81RSIkOXvKp6FsrPHzjO33pExoipCW0srsJev2WQ@9TjjNZG8e1s1ocHGJSWd6W@tCy7v3QU3daKCAigBUOTLMBZ4SWWx4lHynRBCiu2H4tDH6M57h/5aL5Bd6PXRO2O7fto@wf5Z1crROOWgqJfxKj6sH1hvWwocv)
A lambda accepting an array and returning boolean.
-9 bytes: Replace `(x<y&&y>z)||(x>y&&y<z)` with `(y-x)*(y-z)>0` (thanks to [GolfWolf](https://codegolf.stackexchange.com/users/3527/golfwolf))
```
->a{
  a.each_cons(3)              # Take each consecutive triplet
    .any?{ |x,y,z|            # Destructure to x, y, z
      (y-x)*(y-z) > 0         # Check if y is a bump
    }
}
```
[Answer]
# PostgreSQL 173 bytes
```
SELECT DISTINCT ON(a)a,x>j and x>k OR x<least(j,k)FROM(SELECT a,x,lag(x,1,x)OVER(w)j,lead(x,1,x)OVER(w)k FROM d WINDOW w AS(PARTITION BY rn ORDER BY xn))d ORDER BY 1,2 DESC;
     a     | c 
-----------+---
 {1}       | f
 {1,2}     | f
 {1,2,1}   | t
 {1,2,1,2} | t
 {1,2,2}   | f
 {1,2,2,1} | f
 {1,2,2,3} | f
 {1,2,3}   | f
 {1,3,2}   | t
 {2,2,2}   | f
 {3,1,2}   | t
(11 rows)
```
[Answer]
# Java 8, ~~108~~ ~~104~~ ~~101~~ ~~86~~ ~~84~~ ~~79~~ 72 bytes
```
a->{int i=a.length,p=0;for(;i-->1;)i|=p*(p=a[i]-a[i-1])>>-1;return-i>1;}
```
-2 bytes thanks to *@OlivierGrégoire*.  
-13 bytes thanks to *@Nevay*.
[Try it online.](https://tio.run/##lZExb8MgEIX3/IobcWWc2t6K7LFbs6Sb5eHikISEHAjjVJHr3@7SpJXaLUiAdPDx7j044gW5sZKO29Pcaex7eENF4wJAkZduh52E1XcJsDFGSyToWDhqWsBEhP0pzDB6j151sAKCCmbk9RggUBVmWtLeH1JbPYudcUwozutcJOqzsk/MVtioloeF521S1zwXTvrBEVcBmmZxV7fDRgf1nyYXo7ZwDjbZ2jtF@6bF5G5xuYR3N/jD9eVWrq@9l@fMDD6zAfSaGGUdI/kBtwhjnhZpPiW3II/iaRFzoYzBy3/qv4leUffy0UQR3qJyxz1SJF5Gqsf@WVSH4o//aTHNXw)
[Answer]
# [R](https://www.r-project.org/), ~~58~~ 56 bytes
```
function(x)any(abs(diff(sign(diff(c(NA,x)))))>1,na.rm=T)
```
[Try it online!](https://tio.run/##bdDBasQgEADQu18hnkYYCia3gIVeeuxpb64Ua3UrWBOiLSml355u12xJms5FeTPMDDPOXs7@LdkS@gQTN@kDzFOG5@A95HBK9Wfh4Q4n/hO3ApO5GV/lgc/l0ZrsMpU0hlyAkstjgSNd4p7jFcWvrhGbhbeItfqwxVr7p7L9D2uDHbZ7rBtsBrXLoBW2KPbYrFYinBDfjxBoSFR00aVTeYHlQJx/EmpNAeY7hv7KSgWtlRJac2THQt00nNPbZKP1JfduYu6oYjiYXBzQXQu0fYxmyE4yZOelmD4mhtkNkjFOvuZv "R – Try It Online")
Saved 2 bytes thanks to Giuseppe
[Answer]
# [J](http://jsoftware.com/), 16 15 bytes
-1 byte thanks to FrownyFrog
```
1 e.0>2*/\2-/\]
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/DRVS9QzsjLT0Y4x09WNi/2tyKXClJmfkK6QpGKgYwJiGcIaCERITRRxVxhhFBk0hqiyKmcYIjjGyDEiX0X8A "J – Try It Online")
## Original: 16 bytes
```
0>[:<./2*/\2-/\]
```
`2-/\]` - differences of each adjacent items
`2*/\` - products of each adjacent items
`[:<./` - the minimum
`0>` - is negative?
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/DeyirWz09I209GOMdPVjYv9rcilwpSZn5CukKRioGMCYhnCGghESE0UcVcYYRQZNIaosipnGCI4xsgxIl9F/AA "J – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 8 bytes
```
±V<0Ẋ*Ẋ-
```
[Try it online!](https://tio.run/##yygtzv6vkKtR/KipsUjz0Lb/hzaG2Rg83NWlBcS6////j47lijYEYR0jCKkD5cH5xjA@QgYuBtNlDKaNoXwjqG4jqAoA "Husk – Try It Online")
## Explanation
```
±V<0Ẋ*Ẋ-  Implicit input, say [2,5,5,1,4,5,3]
      Ẋ-  Consecutive differences: [3,0,-4,3,1,-2]
    Ẋ*    Consecutive products: [0,0,-12,3,-2]
 V<0      Is any of them negative? Return 1-based index: 3
±         Sign (to make output consistent): 1
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 11 bytes
*-5 bytes thanks to @ETHproductions*
```
ä- mÌäa d>1
```
[Try it online!](https://tio.run/##y0osKPn///ASXYXcwz2HlyQqpNgZ/v8fbahjpAPEsQA) | [Test cases](https://tio.run/##y0osKPn//9C6w0t0FXIP9xxekqiQYmf4/390dKwOV7RhrI4CkNQxAnN0jHTgAgghYxgDRRYkDGWDtYPZxlCWMVzMCGxSLJduEAA)
This uses Dennis's [algorithm](https://codegolf.stackexchange.com/a/155800/61613)
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 9 bytes
```
ä- ä* d<0
```
[Try it online!](https://tio.run/##y0osKPn///ASXYXDS7QUUmwM/v@PNtQx1jGMBQA "Japt – Try It Online")
A mashup of Oliver's answer with the approach used by several other answers.
[Answer]
# [Attache](https://github.com/ConorOBrien-Foxx/attache), 39 bytes
```
Any&:&{_*~?Sum[__]}@Slices&2@Sign@Delta
```
[Try it online!](https://tio.run/##SywpSUzOSP3vkpqWmZcarZKm898xr1LNSq06XqvOPrg0Nzo@PrbWITgnMzm1WM3IITgzPc/BJTWnJPF/LBcXTFdJso5CNJcCEETH6kBoQzhDxwiJqYMsjipjjCKDphBVFsVMYwTHGFnGCGwBVyzQnX6pqSnF0SoFBcnpsVwBRZl5JSGpxSXOicWpxdFpOgolybH/AQ "Attache – Try It Online")
Pretty happy with how this turned out.
## Explanation
This is a composition of four functions:
```
Delta
Sign
Slices&2
Any&:&{_*~?Sum[__]}
```
`Delta` gets the differences between elements. =
Then, `Sign` is applied to each difference, giving us an array of `1`s, `0`s, and `-1`s. =
Then, `Slices&2` gives all slices of length two from the array, giving all pairs of differences.
Finally, `Any&:&{_*~?Sum[__]}` is equivalent to, for input `x`:
```
Any[&{_*~?Sum[__]}, x]
Any[[el] -> { el[0] and not (el[0] + el[1] = 0) }, x]
```
This searches for elements which sum to zero but are not zero. If any such pair of elements exist, then there is a bump.
[Answer]
# [MATL](https://github.com/lmendo/MATL), 8 bytes
```
dZSd|1>a
```
[Try it online!](https://tio.run/##y00syfn/PyUqOKXG0C7xv716SFFpqnqtultiTnGq@v9oQx1jIDTUMdAxjAUA "MATL – Try It Online")
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 33 bytes
```
@(x)0||abs(diff(sign(diff(x))))>1
```
[Try it online!](https://tio.run/##ZY/fCoMgFIev51OcuxQksO4WjV3tCXYXXTTTcWDU0P0Jomd3zjUoEwTP73znU3v5aF7K6TJNU3ekA2sulraoNbV47X6ngfl1EE5CCSOpag7JqblZlRSkEuuKZ3HNA3E2zznIeb5Btsk8FmVbbr5wqV8FeUx8NYs3kqkgRPcGEP3nxN70b0slIzvUoKkcEbmYGIcW7Z1WweK5hENoZVPte8qL/kCwxoTqWuK3@wA "Octave – Try It Online")
### Explanation:
```
@(x)                           % Anonymous function taking x as input
                  diff(x)       % Takes the difference between consecutive elements
             sign(diff(x))      % The sign of the differences
        diff(sign(diff(x)))     % The difference between the signs
    abs(diff(sign(diff(x)))>1   % Check if the absolute value is 2
@(x)abs(diff(sign(diff(x)))>1   % Output as matrices that are treated truthy or falsy
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 10 bytes
```
s₃.¬≤₁∧¬≥₁
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/v/hRU7PeoTWPOpc8amp81LEcxFwKZP7/H22oY6QDxLEA "Brachylog – Try It Online")
Succeeds (`true.`) if there is a bump, and fails (`false.`) if there is no bump.
### Explanation
This is fairly readable already:
```
s₃.           There is a substring of the input…
  .¬≤₁        …which is not non-decreasing…
      ∧       …and…
       ¬≥₁    …which is not non-increasing
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 7 bytes
```
¥ü‚P0‹Z
```
[Try it online!](https://tio.run/##MzBNTDJM/V9TVvn/0NLDex41zAoweNSwM@p/pdLh/Qq6dgqH9yvpxPyPjuWKNgRhHSMIqQPlwfnGMD5CBi4G02UMpo2hfCO4bmOwSl1DHQMdXSMIC6goFgA "05AB1E – Try It Online")
**Explanation**
```
¥         # calculate delta's
 ü‚       # pair each element with the next element
   P      # product of each pair
    0‹    # check each if less than 0
      Z   # max
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 10 bytes
```
s₃s₂ᶠ-ᵐ×<0
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/v/hRUzMQNz3ctkD34dYJh6fbGPxXVYiO5QIShhBSxwhG68BFkMSMEWLI8kjiCBOMoSxjuJgR2Kz/QDkFIx0Fw1gA "Brachylog – Try It Online")
Not nearly as neat and elegant as @Fatalize's existing 10 byte answer, but it works! 
```
s₃   % There exists a substring of three elements [I,J,K] in the array such that
s₂ᶠ  % When it's split into pairs [[I,J],[J,K]]
-ᵐ   % And each difference is taken [I-J, J-K]
×    % And those differences are multiplied (I-J)*(J-K)
     % (At a bump, one of those will be negative and the other positive. 
     % At other places, both differences will be positive, or both negative, 
     %  or one of them 0 - ultimately resulting in a non-negative product.)
<0   % The product is negative
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), 9 bytes
```
▼mεẊ-Ẋo±-
```
[Try it online!](https://tio.run/##yygtzv7//9G0Pbnntj7c1aULxPmHNur@//8/2kgHCGMB "Husk – Try It Online")
Uses Dennis's algorithm.
[Answer]
# [Perl 5](https://www.perl.org/), 54 + 2 (`-pa`) = 56 bytes
```
map$\|=$F[$_-1]!=(sort{$a-$b}@F[$_-2..$_])[1],2..$#F}{
```
[Try it online!](https://tio.run/##K0gtyjH9/z83sUAlpsZWxS1aJV7XMFbRVqM4v6ikWiVRVyWp1gEsaqSnpxIfqxltGKsDYiq71Vb//2@oYASEBv/yC0oy8/OK/@v6muoZGBr81y1IBAA "Perl 5 – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), 60 bytes
```
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
```
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")
[Answer]
# [Pyt](https://github.com/mudkip201/pyt), ~~11~~ 7 [bytes](https://github.com/mudkip201/pyt/wiki/Codepage)
```
₋ʁ*0<Ʃ±
```
Outputs 1 if there is a bump, 0 otherwise
[Try it online!](https://tio.run/##K6gs@f//UVP3qUYtA5tjKw9t/P8/2kjHWAeIYwE)
Port of [Wheat Wizard's Haskell answer](https://codegolf.stackexchange.com/a/155816/77078)
---
# Old way (11 bytes):
```
₋±₋Å1≤ĐŁ↔Ʃ=
```
[Try it online!](https://tio.run/##K6gs@f//UVP3oY1A4nCr4aPOJUcmHG181Dbl2Erb//@jjXSMdUx0jGMB)
Returns False if there is a bump, True otherwise
Port of [Dennis' Jelly answer](https://codegolf.stackexchange.com/a/155800/77078)
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), ~~37~~ 36 bytes
```
FreeQ[(d=Differences)@Sign@d@#,-2|2]&
```
Gives the opposite of the test case answers (False and True reversed). Prepend a `!` to switch to the normal form.
OR 
```
Abs@(d=Differences)@Sign@d@#~FreeQ~2&
```
Also reversed output, so replace `FreeQ` with `MatchQ` for normal form.
Explanation: Take the sign of the differences of the sequence. Iff the resulting sequence includes {1,-1} or {-1,1} there is a bump. The absolute value the differences of {1,-1} or {-1,1} is 2 in either case.
Shave off another byte by squaring the final list instead of taking the absolute value:
```
FreeQ[(d=Differences)@Sign@d@#^2,4]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7360oNTUwWiPF1iUzLS21KDUvObVY0yE4Mz3PIcVBWUfXqMYoVu1/QFFmXkl0mr5DdXWtTrUhCOsYQUgdKA/ON4bxETJwMZguYzBtDOUbgXXXxv4HAA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# Perl, 35 bytes
Includes `+3` for `-p`
`bump.pl`:
```
#!/usr/bin/perl -p
s%\S+ %$a*1*($a=$&-$')%eg;$_=/-/
```
Run as:
```
bump.pl <<< "3 1 2"
```
[Answer]
# [Julia 0.6](http://julialang.org/), 57 56 bytes
```
l->any(p>c<n||p<c>n for(p,c,n)=zip(l,l[2:end],l[3:end]))
```
Basically just totallyhuman's python answer. -1 byte from user71546
[Try it online!](https://tio.run/##yyrNyUw0@59mm5Sanpn3P0fXLjGvUqPALtkmr6amwCbZLk8hLb9Io0AnWSdP07Yqs0AjRycn2sgqNS8lFsgwBjM0Nf8DKa7S4sy8dAWnxOJUvZDU4hIuhxIgWZxaoqAEYigkAyWKlRTAFkHkFNI0og11jHQMYzXRBHSMUIXMzVHEFGGCQISi0kjHAMk0RahxRmhiQA7Qvf8B "Julia 0.6 – Try It Online")
# [Julia 0.6](http://julialang.org/), 39 bytes
```
f(x,y,z,a...)=x>y<z||x<y>z||f(y,z,a...)
```
Lispy recursion style, aka Dennis's python answer. Returns `true` when a bump exists, otherwise throws an error. This should maybe be 42 bytes since you have to splat it when calling. Eg for `a=[1,2,1]` you call as `f(a...)`. `f(a)=f(a...)` would remove that need, but is longer. I need to get better a recursion, and I don't really like writing code that throws an error. 
[Try it online!](https://tio.run/##yyrNyUw0@/8/TaNCp1KnSidRT09P07bCrtKmqqamwqbSDkilacBl/pcWZ@alKzglFqfqhaQWl3A5lADJ4tQSBSUQQyEZKFGspJCUmp6ZB5FTSNOINtQx0jGMBelHE9MxwhA1N0cTji/JKMovL1bwTS3JyE9xLSrKL4KrBCJ0E4x0DFDswqndCM1ROBRCVKTmpfwHAA "Julia 0.6 – Try It Online")
]