Post History
Jelly, 9 bytes ŒHß¹Ḋ?€ZẎ Try it online! How it works ŒHß¹Ḋ?€ZẎ - Main link f(S). Takes a string S on the left ŒH - Split S into two halves € - Over each half H: ? - ...
Answer
#1: Initial revision
# [Jelly], 9 bytes ŒHß¹Ḋ?€ZẎ [Try it online!][TIO-knnjsy1w] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-knnjsy1w]: https://tio.run/##y0rNyan8///oJI/D8w/tfLijy/5R05qoh7v6/h9u14z8/1/dOSQyyD9AXUdB3dU/0jnEzy8gyBPECwr1d/VzC3Z1dPMNcvEIUQcA "Jelly – Try It Online" ## How it works ŒHß¹Ḋ?€ZẎ - Main link f(S). Takes a string S on the left ŒH - Split S into two halves € - Over each half H: ? - If: Ḋ - Condition: H has more than 1 element ß - Then: yield f(H) ¹ - Else: yield H Z - Transpose the pair Ẏ - Dump inner lists