#SOGL V0.12, 9 bytes :⌡-≤H⌡-¹∑
SOGL V0.12, 9 bytes
:⌡-≤H⌡-¹∑
Try it Here! (→
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