# [SOGL V0.12](https://github.com/dzaima/SOGL), 9 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
    :⌡-≤H⌡-¹∑

[Try it Here!](https://dzaima.github.io/SOGLOnline/?code=JXUyMTkyJTNBJXUyMzIxLSV1MjI2NEgldTIzMjEtJUI5JXUyMjEx,inputs=JTVCJTVCMSUyQyUyMDIlMkMlMjAzJTJDJTIwNCU1RCUyQyUyMCU1QjQlMkMlMjA1JTJDJTIwNiUyQyUyMDclNUQlMkMlMjAlNUI3JTJDJTIwMSUyQyUyMDglMkMlMjAyJTVEJTVE) (`→` added because this takes input on the stack)

Explanation:
               
    :          duplicate ToS
     ⌡         for each do
      -          get deltas
       ≤       get the duplicate ontop
        H      rotate it anti-clockwise
         ⌡     for each do
          -      get deltas
           ¹   wrap all of that in an array
            ∑  sum