[Question]
  [
Imagine that a list of integers describes the heights of some two-dimensional terrain as seen from the side.
```
Stamina: [   4   4   4   4   4   4   3   3   3   3   2   2   2   -   ]
             O
            /|\
            / \
           +---+               +---+
           |   |               |   |
           +---+           +---+---+           +---+
           |   |           |   |   |           |   |
           +---+           +---+---+           +---+           +---+
           |   |           |   |   |           |   |           |   |
           +---+           +---+---+       +---+---+           +---+
           |   |           |   |   |       |   |   |           |   |
           +---+---+   +---+---+---+   +---+---+---+           +---+
           |   |   |   |   |   |   |OW!|   |   |   |OW!  STUCK!|   |
           +---+---+---+---+---+---+---+---+---+---+---+---+---+---+
           |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
           +---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Height:  [   6   2   1   2   5   6   1   2   3   5   1   1   1   4   ]
```
A climber is standing on the first piece of terrain. Her goal is to reach the far end. She has a stamina rating that determines the maximum height she can climb. Unfortunately, she has never heard of rappelling before, so she simply jumps off any cliffs she encounters. If she falls a greater distance than her current stamina, her stamina drops by one.
## Task
Determine whether the climber can traverse the terrain.
## Rules
* The climber moves strictly from left to right.
* The climber must visit every piece of reachable terrain.
* Stamina determines maximum climbing height.
* Stamina decreases by one when fall height exceeds stamina — no matter how long the drop.
* Zero is the minimum stamina.
* The terrain is untraversable if the climber encounters a cliff above her that is taller than her current stamina level.
* The terrain is traversable if the climber is able to stand on the last piece of terrain.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the answer with the fewest bytes (in each language) wins.
## Format
* You must accept an integer (representing starting stamina) and a list of integers (representing heights) in [any reasonable format](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods).
* You must output a truthy/falsy value. You may either use your language's convention for truthy/falsy or any two distinct values representing truthy and falsy.
* Starting stamina will be \$\geq0\$.
* The length of the list will be \$\geq2\$.
* All heights in the list will be \$\geq1\$.
## Test cases
The farthest reachable piece of terrain is in bold.
| Truthy | What is this testing? |
| --- | --- |
| 
```
0, [1,1,1,1,**1**]0, [50,45,20,19,18,10,1,1,**1**]5, [1,6,11,16,21,26,**31**]100, [500,1,**100**]45, [20,**50**]4, [6,2,1,2,5,6,1,2,3,5,1,1,1,**3**]17, [59,61,47,64,23,34,21,22,25,29,**25**]
```
 | 
```
Flat terrain with 0 staminaDrops with 0 staminaArduous climb, barely doableLong drop, strong climberShort trek, excess staminaExample with a shorter cliff at the endRandomly generated
```
 |
| Falsy | What is this testing? |
| --- | --- |
| 
```
4, [6,2,1,2,5,6,1,2,3,5,1,1,**1**,4]0, [1,**1**,2,1,1]5, [30,28,22,18,13,9,7,9,**11**,14,22,23]6, [**40**,47,49,55,61,66,69,70,50,55]45, [79,48,41,70,76,85,27,12,31,66,13,**17**,94,77]31, [65,21,20,32,9,9,37,14,23,19,**32**,63]
```
 | 
```
ExampleSmall hill with no staminaValley with too many dropsEarly failureRandomly generatedRandomly generated
```
 |
 
  
[Answer]
# JavaScript (ES6), 39 bytes
Expects `(stamina)(list)`. Returns *false* for truthy and *true* for falsy.
```
n=>a=>a.some(v=>-n>a-(n-=n&&a-v>n,a=v))
```
[Try it online!](https://tio.run/##fVLLboMwELz3KzglIA2R10@sCo79gt7SHFCa9KHUVCFF6tfTtdNDK5kIA5Z3Z3Zm5Pd@6sf9@e3zUofh@TAf2zm0Xc9rMw4fh3Jquzp0fV2Gug2rVV9PXUDfTlU174cwDqfD5jS8lOvt4/nr8vq9W1f3d38Lx7IoRFVuCb/PrqqyDUZAG0gB8qAGJJbbTeKzIK5bSIK0UJlOElfiRCVEhkpHKp5pcsVCc5H5GS1h4jz@K95dnagMhFwc6GEJ2sFqSAWlk0QJyfY8fyPuH3D9FLYP/WnMp3dbhV7Kk1LjjQSVgGyirpi2gofjN0aqk9icvcIyTovoTXsYE31aC8vYmCGfLGXsPHQDTbHRWTQchQOxkUTA44mnaziXIVAUEzApRQElWaaHckmoiteFj6xayqFhXxpR2PwD "JavaScript (Node.js) – Try It Online")
### Commented
```
n =>             // outer function taking the stamina n
a =>             // inner function taking the array of heights a[],
                 // re-used to store the previous height
a.some(v =>      // for each height v in a[]:
  -n >           //   trigger some() if -n > a - v (i.e. n < v - a,
  a - (          //   meaning that we can't climb)
    n -=         //   decrement n if:
      n &&       //     it's not already 0
      a - v > n, //     and a - v is greater than n
    a = v        //   update a to v
  )              //   NB: a - v is always NaN the first time
)                // end of some()
```
[Answer]
# Excel (ms365), ~~75~~, 64 bytes
-11 bytes thanks to [@Dominic](https://codegolf.stackexchange.com/users/95126/dominic-van-essen)
[![enter image description here](https://i.stack.imgur.com/6VcDp.png)](https://i.stack.imgur.com/6VcDp.png)
```
=REDUCE(B1,A2:A5-A1:A4,LAMBDA(a,b,IF(b>a,-1,a-(-b>a)*(a>0))))>=0
```
[Answer]
# [R](https://www.r-project.org), ~~52~~ 49 bytes
```
\(s,t)any(Map(\(i)s<<-s-(-i>s)*!!s,d<-diff(t))<d)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=hVHLSgMxFMWtX9F2lcgZyDsTmAoudKUbH7tuxrYDBRmkmQp-i5sq-FH6EX6DN0mVdiEyzGRycs6959y8vK63b930fTN0Vf0hZyxi4G3_zK7aRzZjKx6bpooVq1ankZ-MxxGLplqsuo4NnDcLXoSfR1_zdmCTTT-s2z4-LdexvX9Yjqaji7PLm_NZP-HHHRMYzZnE7uG_kBUwFkpABsgaUuwRbNE4SEIclIRy0OVMip08C4TIoMkKKmZ3-7QlIVEUbCpEq6a_YkOXSj4XCnASxsMZKA1tcjsFReYCfYn6R8rb67ufkP_0M_xgEuowqBZQdWqZxqAR4OlNyU32Ucy6xDQiGTUB1ibTzsERO6UmZG8QPsDUMDKdeYeaonhIcpQ11IOiBwPvs4bQ5N7m4AJaUfsA7bMBne6HIEc2yrVvt2X9Bg)
Outputs `TRUE` if the terrain is untraversable, `FALSE` otherwise.
[Answer]
# [Haskell](https://www.haskell.org/), ~~66~~ 56 bytes
With Joseph Sible-Reinstate Monica's suggestions:  
(doesn't change typing or behavior, except now it's a total function, which is a plus!)
```
s%(h:j@(i:_))=i-h<=s&&max 0(s-fromEnum(h-i>s))%j;_%_=1>0
```
##### Original:
```
f _[_]=True;f s(h:j@(i:_))=(i-h<=s)&&f(max 0$s-fromEnum((h-i)>s))j
```
[try it online](https://play.haskell.org/saved/jkfcP0wr)
`f` has an intuitive type signature, and matches my reference implementation (on legal inputs).
```
f :: Int -> [Int] -> Bool
```
```
basic :: Int -> [Int] -> Bool
basic _ [] = True
basic _ [h] = True
basic s (h1 : hs@(h2 : _)) = (r <= s') && basic (s' - (if (-r) > s' then 1 else 0)) hs
  where r = h2 - h1
        s' = max 0 s
```
[Answer]
# [PowerShell Core](https://github.com/PowerShell/PowerShell), 77 bytes
```
param($s,$l)$args|?{if(($l-=$_)-ge0){$s-=+($l-gt$s)*!!$s}else{-$l-gt$s}$l=$_}
```
[Try it online!](https://tio.run/##pVLBbqMwFLznK5zKqqAFCbCB5BBtpKq97mrbW7WqKHXSVqRkMVErUb49O892SXaL9lJkno09b2beM9v6VTX6UVVVWNaN2vPVottvi6bYeFwHvPJ50az1@7fuaeV5vAoX/M4P1yryO67DxTltrVuu/bPplOteVVp1odvreQV0v@8nk6U3YXgCtvQiCnHADsMPGG@bnfL/xqSIMg1Ygjme453hjf6TlTrmDKeEwJxgTjCLEXgcORnHGUWfMdJwkoN07JQCqRgCxNSKm7Uwn0OVYsRAbvRRWgaAxFcGxgSJQjrr4EmoBXOav2ZAUvqqwAX5Y3eRHLr6D8i0QACazKwjcxFgh6ncRNNt6eyKEYrMmI1skRIZaWqLznCSEY/pMO2PZNtLyAGTUJaxhedInVFvQBlTuY6OnFFn5zCU5yN0BISl1LUYVCIxZWCI3FUi7D9HJ9lxRT57Z1d1c1mUj@H3@2dVtqwzzFy3xebppQC0vse6rJTGWr1tgVEPbMH4nQU2Su@qFhunfDWkseWQZVC3P64vdrqtN1bk19Kq0HO9K0ulNQPD9IMsVL8PWgPyRun2otAKyJNBKDwyeDJAL498fuL5aUVI0Qmao37S7/8A "PowerShell Core – Try It Online")
Passes the obstacle list using splatting.  
Returns an empty array if traversable, `false` in PowerShell  
Non empty otherwise, `true` in Powershell
[Answer]
# [Rust](https://www.rust-lang.org), 90 bytes
```
fn f(a:&[i32],b:i32)->bool{a.len()<2||a[1]-a[0]<=b&&f(&a[1..],b-(a[0]-a[1]>b&&b>0)as i32)}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=lVJNb4JAEE16K79i9WAgeZj9Yhdsa_9HDQdoJDGh2CD2ov6SXjy0p_6i9td0FlAxPTWEXTJvZt6bx7x_1NtNc_wqKvaSrSo_YLvPbVOE8fcThQo_m00WKyVT5DO6gnCer9flLpuWS8q9l_t9thBpmC14ev-QTyaFP6HAdEr5oe-iocPnhORzHmQb5pocOoafm4NXrGvm52AZWL3cbMsmYKuKvS2fRwvP5-i-BPonBWvq7TLABYs4dATJIRKIGIL_yYzOXQwEQQZSQBqoYZLgl4ZtC84HqD71IJ7oCujj1JOKJCLHQbeir06zGpLYE0cCI6AtjIZUULqVJCFpkoTOfzFoyi6ycnNli2iTOiPO4GkKxSFjx-cMU0hg6XXW6FaEGtaYvkZzp1cniCKn3RgYqnN2UGRYcPbKJtAxtHBZ1iCm2SwEKW-riZfsSDSsHVYT2M8btZ5wKEniEijbylPuP1PIDEWmbOfdvtarqimrkT8u_N3s8QDmzuDBneN2wWjN3HoiDwLv4N31W3g8dvcv)
Recursive approach
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 15 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
¥vDyÄ‹i<y1‹ˆ]¯P
```
Inputs in the order \$heights,stamina\$.
[Try it online](https://tio.run/##yy9OTMpM/f//0NIyl8rDLY8admbaVBoCqdNtsYfWB/z/H22mY6RjCMSmOmZg2hjIMgRDk1guEwA) or [verify all test cases](https://tio.run/##hVA7TsQwEL1KlPoJeezxOJaQtuEAVDSRJUCi2IpipZXSUaA9AHegpqGhDSW32IuEZ2dXQIUifzLz5n38uLu73z4s@2nTd8fDS9dvpttdv8yv@6vp8/n49LG9nITH16HMb9dLf3GD@X0Zx1Fw@gpcQTeO0UEjvINkyABxf9sCg/Df4AXeENiJp8EGdcS1jSWyRN50BXCEAI9YKXgG3lbxQMzKkWECTTCFDwjaVDw8HWXupE7/cOmZS1rjl/Xg4IfKVmMFZCSumkWbRDgHUVcdaEaM1Y0ZjNgahZUCa6CUoQNUaiMZBhpMEBppA6QXsitS@okfWxiH4KmbEVJTDvWhWTLq8zHLNw).
**Explanation:**
```
¥            # Get the deltas (forward differences) of the first (implicit) input-list
 v           # Pop and loop over each difference `y` of this list:
  D          #  Duplicate the current stamina
             #  (which will be the second implicit input-integer in the first iteration)
   yÄ        #  Push the absolute value of difference `y`
     ‹i      #  If the stamina is smaller than the absolute `y`:
       <     #   Decrease the stamina by 1
       y1‹   #   Check if `y` is negative (it's a drop) or 0 (it's flat terrain)
          ˆ  #   Add that check to the global array
 ]           # Close both the if-statement and loop
  ¯          # Push the global array
   P         # Check if all are truthy by taking the product (aka, none were climbs)
             # (which is output implicitly as result)
```
[Answer]
# [Nekomata](https://github.com/AlephAlpha/Nekomata) + `-e`, 16 bytes
```
R↔$∆çJᵐ{CᵈAc}-0≥
```
[Attempt This Online!](https://ato.pxeger.com/run?1=hVAvTwMxHA32PsXlgnyX9Nf-2l4lwSGxlxNjGQYGYkMR7DIcAoeZYAGBnULyLXDbJ-G12zS59Nq-vn_t2-fd5OZ-OpqPvvqmnTaom3bSDKv1w_y67b4vd4vX091y8fNxsd28PJ5vN8uz8VNrds_r99nVeHbgrX5Pbk3dCw7fUHHnDdTDGkiCdBBzPPOZGSDcBFiBDXCExRRRoRkzVEoe1T4v655MHlj4rOTsuNqnOUojlQlBoBFBYR2cFmsLyw6J_39ctHSWgh5bOgPbZY9c3yEhcuTaWowZHOpeTQ7VBO9zgRAQSMy9iexvERO0g0qGY0DHRhHC9EKns9BYEeNQOWFJX6obOMu8BBdLossPSSi4Yf_qfw)
This works in Nekomata v0.2.0.0, and uses some new built-ins.
The flag `-e` set the interpreter to `CheckExistence` mode, which prints `True` if the computation has any result, and `False` otherwise.
```
R↔                  Take the range from the starting stamina down to 1
  $                 Swap
   ∆                Get the deltas of the list of heights
    ç               Prepend zero
     J              Non-deterministically split the list into a list of sublists
                      The concatenation of these sublists should be the original list
      ᵐ{    }       For each sublist
        CᵈAc          Replace each item except the head with its absolute value
             -      Subtract (automatically vectorize and pad zeros)
              0≥    Check if all items in the result are greater than zero
```
---
## [Nekomata v0.1.1.0](https://github.com/AlephAlpha/Nekomata/tree/v0.1.1.0) + `-e`, 21 bytes
```
R↔$:t-i_0cJᵐ{CᵈAc}-0≥
```
This is the original answer in Nekomata v0.1.1.0.
```
R↔                       Take the range from the starting stamina down to 1
  $                      Swap
   :t-i_                 Get the deltas of the list of heights
        0c               Prepend zero
          J              Non-deterministically split the list into a list of sublists
                           The concatenation of these sublists should be the original list
           ᵐ{    }       For each sublist
             CᵈAc          Replace each item except the head with its absolute value
                  -      Subtract (automatically vectorize and pad zeros)
                   0≥    Check if all items in the result are greater than zero
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 71 bytes
```
Length@a<2||(a[[2]]-a[[1]]<=b&&f[Rest@a,b-Boole[a[[1]]-a[[2]]>b&&b>0]])
```
[Try it online!](https://tio.run/##jVJNa8JAEL33VwQP0kKE7Fc2tirSQ089lNLbdpFNiVXwAzQ9lOpvT9/srq1RC4XdnWRn3ps3L1m6elYtXT1/c83UuElaTuztsHmsVu/1bOwGfLe7dsZwa3sIzNrBsOx2p@a52tZjl5a9@/V6UZmQ64XKESrKUWbtTfO0ma9q0zEvm4969mk79u4qXE3NF0uT37VPEwCOsipLE6nShCOyPnaBnf1dj8sc95RD5IgcUVChOiGOLFm292crS@0UJWQbRZwehlOFVv5Z@NefOQQh2@2gPUdGakQJDBBCRoUg4DRjnyKp0YSN4M7ryjy4xfbEtn8qkWdK2KHyon8Cg/MiaPJegw@ytD@9rTIKFmeWyizMJ1GqVJg3h7CcCLyhdA9Y3oJppCVaSRbKNCAF2QEqRhNFGpLCSAgUaH3h26hoJzgE94KxhI6aRfiBKJOTdsFa6MIPiUJ18KT5Bg)
Original Code is
```
f[a_List, b_Integer] := 
  Length[a] < 2 || (
    a[[2]] - a[[1]] <= b && 
    f[
      Rest[a], 
      b - Boole[a[[1]] - a[[2]] > b && b > 0]
    ]
  )
```
It defines a recursive function `f` that takes two arguments: a slice of integers `a` and an integer `b`. The function returns a boolean value that checks if the difference between consecutive elements in the slice is less than or equal to `b`. If the difference is greater than `b`, it deducts 1 from `b` for the next recursive call.
[Answer]
# [Python 3](https://docs.python.org/3/), 56 bytes
```
f=lambda s,n,m=0,*t:m<1or(s>=m-n)&f(s-min(s,n-m>s),m,*t)
```
[Try it online!](https://tio.run/##hVBLasMwFNz7FFoVu0xAf1mhyUWKFy5NaCCSTWwCPb07UtJui5H1NJqZN0/z9/o1ZbNt58N1TB@fo1iQkQ4Sr@s@vanp1i7HQ9rl7uXcLrt0yS0Ju3RcOiRyuu083agRq7hkkca5Pd3HK8Q0n3Iru27fCDHfLnltKYegAJXdbRLiXeH5DU05OgnroCVUhOqh5O@lq1wPxZOHVtAehriSD1klSjk0tjBp4ErNkmReabgi5m5YPVoaqkMRR3gFG@AttIGx1V5DM0jk/z8f@4iuKvwX1kjovtiUMQwiAldJb6s3m3uyrCyNbYRzJYT38GSW9ESew4QI28OqggePnrECFBNUPr05RbQIYWgIMamrA0gYzZYRJtSmprwpIW@GHw "Python 3 – Try It Online")
Takes the stamina as first argument and the splatted terrain as consecutive arguments.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 20 bytes
```
’¹¹?{ḷ<?N-N>?
_Ɲçƒ<0
```
Takes a comma-separated list of integers on the left-hand side and the starting stamina on the right-hand side. Returns 1 if stuck, 0 if traversable.
Consists of two links.
Link 1: Update stamina (set stamina to -1 if we can't keep going; dyadic with x = current stamina and y = fall distance)
```
      <?                      If stamina < fall distance then
’¹¹?{                         Decrement stamina if nonzero, else return stamina
     ḷ                        Else return current stamina
        N                     Negate stamina
           >?                 If - stamina > fall distance
                              (i.e. if stamina < hill height)
         -                    Then return -1 (we're stuck)
          N                   Else return stamina
```
Link 2: Main link (dyadic with x = hill heights and y = starting stamina)
```
_Ɲ                            Take difference of consecutive elements of heights list
  çƒ                          Update stamina for each hill/fall we have to traverse
    <0                        Return 1 if stamina is less than zero, or
                              0 if stamina is still nonnegative
```
[Answer]
# MMIX machine language, 18 instrs (72 bytes)
Assumes terrain is 0-terminated, and at least one part long.
`bool __mmixware f(octa stamina, octa *terrain);`
```
00000000: e2020001 8d030100 8dff0108 e7010008  Ä£¡¢⁽¤¢¡⁽”¢®ḃ¢¡®
00000010: 42ff000d 320403ff 4c040007 260403ff  B”¡Æ2¥¤”L¥¡¬&¥¤”
00000020: 32040004 71040401 7a040004 26000004  2¥¡¥q¥¥¢z¥¡¥&¡¡¥
00000030: f1fffff5 2604ff03 32040004 78020402  ȯ””ṫ&¥”¤2¥¡¥x£¥£
00000040: f1fffff1 f8030000                    ȯ””ȯẏ¤¡¡
```
Disassembled:
```
f   SETL $2,1           // rv = 1
0H  LDO $3,$1,0         // start: curht = *terrain
    LDO $255,$1,8       // nextht = terrain[1]
    INCL $1,8           // terrain++
    BZ $255,2F          // if(!nextht) goto ret
    CMPU $4,$3,$255
    BNP $4,1F           // if(curht <= nextht) goto increase
    SUBU $4,$3,$255     // $4 = curht - nextht
    CMPU $4,$0,$4       // $4 = stamina <=> curht - nextht 
    ZSN  $4,$4,1        // $4 = stamina < curht - nextht
    ZSNZ $4,$0,$4       // $4 = (stamina < curht - nextht) && stamina
    SUBU $0,$0,$4       // decrement stamina if nonzero and drop is larger
    JMP 0B              // goto start
1H  SUBU $4,$255,$3     // increase: $4 = nextht - curht
    CMPU $4,$0,$4       // $4 = stamina <=> nextht - curht
    ZSNN $2,$4,$2       // rv &&= stamina >= nextht - curht
    JMP 0B              // goto start
2H  POP 3,0             // ret: return(rv, stamina, terrain)
```
A fairly simple algorithm. I could have put the return inline, but branches not taken are usually cheaper than branches taken in terms of time. The positioning of the second load before the increment is to decrease stalls, as the next usage of the incremented variable is in the next loop.
It was cheaper in terms of instructions to do two loads per iteration instead of transferring the next height to the current height, but it would probably take longer on a real machine; my initial plan was to transfer, hence the lack of stores to `$255`.
The reason for the usage of `$3`, `$4`, and `$255` as temp registers instead of some other combination is that `$3` and `$4` go on the register stack, and it's expensive to use that too much, but `$255` is a global scratch register.
[Answer]
# [Thunno](https://github.com/Thunno/Thunno), \$24\log\_{256}(96)\approx\$ 19.75 bytes
```
lXz[{YDyZA<?1-y1<xsTX}xP
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72sJKM0Ly9_wYKlpSVpuhY7ciKqoqsjXSqjHG3sDXUrDW0qikMiaisCINJQVQv2R5vpGOkYArGpjhmYNgayDMHQJJbLBKIMAA)
Port of Kevin Cruijssen's 05AB1E answer.
#### Explanation
```
lX  # Store an empty list in x (for later)
z[  # Get the deltas of the first input
{Y  # Loop through with variable y:
Dy  #  Duplicate and push y
ZA  #  Absolute value of y
<?  #  If it is less than the absolute value:
1-  #   Decrement it
y   #   Push y again
1<  #   Is it less than 1?
xs  #   Push x and swap
TX  #   Append and store in x
}x  # After the loop, push x
P   # Take the product
    # Implicit output
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 29 bytes
```
¹≔§η⁰ζＦη«≧⁻∧θ‹ι⁻ζθθ¿›ι⁺ζθ⎚≔ιζ
```
[Try it online!](https://tio.run/##Rc4xC8IwEAXg2f6KN17gBKuoQ6fiIIJCcRWH0KZNIKSaVJGKvz1aK7jc8N4H70otfdlKG2PhjesoFVmSh2AaR3m3c5V6kGbMBKP/NHXrQVrgmUwO8jK6o2l0RwfjboGRu4qujL0KgQzjm1LPuAohhpslE1ODtl7JTvmBFPYvsLFKehqUskHh94gZx18xnlLGacVYM5aMBWPOSM/nOL3bNw "Charcoal – Try It Online") Link is to verbose version of code. Outputs a Charcoal boolean, i.e. `-` for traversable, nothing if not. Explanation:
```
¹
```
Assume that the terrain is traversable.
```
≔§η⁰ζ
```
Get the starting height.
```
Ｆη«
```
Loop through the heights.
```
≧⁻∧θ‹ι⁻ζθθ
```
If this is a drop of more than the stamina then decrement the stamina.
```
¿›ι⁺ζθ⎚
```
If this is a climb of more than the stamina then clear the canvas.
```
≔ιζ
```
(Otherwise) Save the current value as the previous value.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 49 bytes
```
->s,h{h.none?{|w|h,=*h;s<h-w&&s-=s<=>0;s<-h+h=w}}
```
[Try it online!](https://tio.run/##jVHLbgIxELv3KziB1DpVHpNko7L0QxCXSkU50apbhCrg27eewFZwq1b7iMf22Nqv/dvPuO1HsxpQj/V597F7fz2eDqeK/rG@DMtqDvP5YPph2a8sz6Y@1f5wPo@fs@3aYrZ2uF6bzcOERQuJ8BauwHVw9o4RmyrBEUrwDj4hTENnLwZNYu0VFdXQL/4BPFNLkkdUL74Dvy5ZwmSW1asgOUhGEviAIG2lh2fCwqdy99/DbGGMWfzDXG6Kuja7rxYsfKcLtHlAQeatXaVtnbIlUsVqLimIUTOmhES61iRyWz0XSAdxOswJHaNnOKZqIm5h0yLI@SoizgqxNbUIngkKQm4Zgv4VQolJxl8 "Ruby – Try It Online")
[Answer]
# [Java 8 (OpenJDK 8)](http://openjdk.java.net/), 157 ~~159~~ bytes
> 
> -2 bytes thanks to @ceilingcat !
> 
> 
> 
Fun challenge and well presented too!  
  
I get the feeling it may be shorter to do it in Java in a more classic way (probably under 100 bytes), but i wanted to try it using only the inline Stream approach :)
```
(n,l)->l.stream().map(e->new int[]{e}).reduce(new int[]{l.get(0),n,1},(a,b)->new int[]{b[0],a[1]-(a[0]-b[0]>a[1]&a[1]>0?1:0),a[2]<1|a[0]+a[1]<b[0]?0:1})[2]>0
```
[Try it online!](https://tio.run/##pZRRb5swEMff@ymsRpqMdiAbjAltRrWXSZOyp@4N8eAkTkbmQAROp6jjs6dnlml9WKBqggLm7Pv77ud/slVPyq/3utqufp72h4Upl2RpVNuSb6qsyPPNDSFlZXWzVktN5hgg@FnUtdGqImuKc6QCskWZ4GBLE8zL1s6@YsZGNxkx3j0mdE6ltcqi@JwY8ulEKzCen5mgtY1WO@oFO7Wn2s8q/cvtlxfPuvOCRq8OS03/BU2w0ZYyDyrgHVAFC@91ziJnBaicFz5VOPTde@beP7hbxh74HeaqPCxm/Ldb8dHFZ27ZA7vjnYczGTvdu3rPMM5lP9XliuwQCX20TVlt8oKoZtN6ZyCPx9bqXVAfbLDHaWsqejuZTMj35mB/HAkOb3sS/11pgjVlrxl@bhp1bAPVOpiUw/nyvHdrxAxEDCEDngKfAmdvU4yHqpLAUUJCyCGUEI2KcTZYYF8SY2MqYqAm7C8eF7icj71gESHErjd8Rjj6wz4abS4Z6C0FyUEkIAWEEUSiRxZCiCeS4n1Iu3fRF2Xat5joXa2JK2zFe63rjBQxCKcOh/NlBCkk@HXOEj2jUfLysrRgjrpIIY7dCUgJEuWdSTByjdGSFMQUBHdiiYQpHmQCHKn2m2AXaIdUQJKMbYIJl48s7n3CIAqRSApR0jOJ3G8YQ/IvGfx37U4v "Java 8 (OpenJDK 8) – Try It Online")
---
It might be a bit hard to read so i'll try to explain a bit :  
  
Each element of the list of heights is `mapped` to a single-cell integer array containing the corresponding value. This change of type in the Stream allows the `reduce` to carry an array of integers (with a different length) throughout the different iterations.  
  
The `accumulator` of the reduce is a 3-cell integer array carrying :  
`[ height of previous position / current stamina / stuckness status ]`  
(we can't re-use the variable of the stamina parameter as itself, as it's forbidden in Java to rewrite in the Stream variables from outside of the Stream)  
  
Each iteration in the `reduce` calculates and stores the informations for the next iteration. And at the end, we just have to extract the "stuckness status" of the resulting array.  
  
Note : there are conditions to prevent the stamina from falling below zero, and for preserving the stuckness status until the end. Without these it would be bugged.
[Answer]
# [Haskell](https://en.wikipedia.org/wiki/Haskell), uncompetitive for now
```
traversable stamina terrain = length terrain == 1 ||
    ((head terrain + stamina) >= (terrain !! 1)) &&
    traversable (max (stamina - fromEnum ((head terrain - (terrain !! 1)) > stamina)) 0) (tail terrain)
```
I don't want golfing tips. It's uncompetitive for now, but I'll soon golf it, which will be PAINFUL.
]