Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

71%
+3 −0
Challenges Beaver Code Decryption

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: ? - ...

posted 3y ago by caird coinheringaahing‭

Answer
#1: Initial revision by user avatar caird coinheringaahing‭ · 2021-04-18T19:20:39Z (over 3 years ago)
# [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