Skip to main content
Commonmark migration
Source Link

#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

#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

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
added 323 characters in body
Source Link
dzaima
  • 20.3k
  • 2
  • 41
  • 75

#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

#SOGL V0.12, 9 bytes :⌡-≤H⌡-¹∑

Try it Here! ( added because this takes input on the stack)

#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
Source Link
dzaima
  • 20.3k
  • 2
  • 41
  • 75

#SOGL V0.12, 9 bytes :⌡-≤H⌡-¹∑

Try it Here! ( added because this takes input on the stack)