Skip to main content
added 62 characters in body
Source Link
Conor O'Brien
  • 40.2k
  • 3
  • 91
  • 180

Jolf, 13 bytes

ΆFi liγhj_γgi

A tranpilation of the JavaScript answer.

Explanation:

ΆFi liγhj_γgi
Ά             ternary add
 Fi            i[0],
   `li         i sliced
      γhj       γ = j + 1
         _γ     to -γ
           gi  and the last of i

Try it here!

A more interesting post-question version:

 ΆFi]ihjYgi

Jolf, 13 bytes

ΆFi liγhj_γgi

A tranpilation of the JavaScript answer.

Explanation:

ΆFi liγhj_γgi
Ά             ternary add
 Fi            i[0],
   `li         i sliced
      γhj       γ = j + 1
         _γ     to -γ
           gi  and the last of i

Try it here!

Jolf, 13 bytes

ΆFi liγhj_γgi

A tranpilation of the JavaScript answer.

Explanation:

ΆFi liγhj_γgi
Ά             ternary add
 Fi            i[0],
   `li         i sliced
      γhj       γ = j + 1
         _γ     to -γ
           gi  and the last of i

Try it here!

A more interesting post-question version:

 ΆFi]ihjYgi
Source Link
Conor O'Brien
  • 40.2k
  • 3
  • 91
  • 180

Jolf, 13 bytes

ΆFi liγhj_γgi

A tranpilation of the JavaScript answer.

Explanation:

ΆFi liγhj_γgi
Ά             ternary add
 Fi            i[0],
   `li         i sliced
      γhj       γ = j + 1
         _γ     to -γ
           gi  and the last of i

Try it here!