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 Evaluation order of an APL n-train

Jelly, 8 bytes ṖUs2UṭµF Try it online! -1 byte thanks to caird coinheringaahing (Also posted on Stack Exchange by myself) ṖUs2UṭµF Main Link Ṗ pop (remove last element; for numbe...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
#4: Post edited by user avatar hyper-neutrino‭ · 2021-06-07T23:37:23Z (almost 3 years ago)
  • # [Jelly], 9 bytes
  • ’RUs2UṭµF
  • [Try it online!][TIO-kpn42hiq]
  • [Jelly]: https://github.com/DennisMitchell/jelly
  • [TIO-kpn42hiq]: https://tio.run/##y0rNyan8//9Rw8yg0GKj0Ic71x7a6vbf0CDocPujpjXu/wE "Jelly – Try It Online"
  • (Also posted on [Stack Exchange](https://codegolf.stackexchange.com/a/229217/68942) by myself)
  • ```
  • ’RUs2UṭµF Main Link
  • decrement
  • R range
  • U reverse
  • s2 slice into chunks of length 2
  • U reverse each chunk
  • ṭ tack; prepend the input
  • µ (new chain)
  • F flatten the list
  • ```
  • # [Jelly], 8 bytes
  • Us2UṭµF
  • [Try it online!][TIO-kpn96on4]
  • [Jelly]: https://github.com/DennisMitchell/jelly
  • [TIO-kpn96on4]: https://tio.run/##AR8A4P9qZWxsef//4bmWVXMyVeG5rcK1Rv8xMFLDh@KCrEf/ "Jelly – Try It Online"
  • -1 byte thanks to caird coinheringaahing
  • (Also posted on [Stack Exchange](https://codegolf.stackexchange.com/a/229217/68942) by myself)
  • ```
  • Us2UṭµF Main Link
  • pop (remove last element; for numbers, comes with an implicit range)
  • U reverse
  • s2 slice into chunks of length 2
  • U reverse each chunk
  • tack; prepend the input
  • µ (new chain)
  • F flatten the list
  • ```
#3: Post edited by user avatar hyper-neutrino‭ · 2021-06-07T21:22:20Z (almost 3 years ago)
  • # [Jelly], 9 bytes
  • ’RUs2UṭµF
  • [Try it online!][TIO-kpn42hiq]
  • [Jelly]: https://github.com/DennisMitchell/jelly
  • [TIO-kpn42hiq]: https://tio.run/##y0rNyan8//9Rw8yg0GKj0Ic71x7a6vbf0CDocPujpjXu/wE "Jelly – Try It Online"
  • ```
  • ’RUs2UṭµF Main Link
  • ’ decrement
  • R range
  • U reverse
  • s2 slice into chunks of length 2
  • U reverse each chunk
  • ṭ tack; prepend the input
  • µ (new chain)
  • F flatten the list
  • ```
  • # [Jelly], 9 bytes
  • ’RUs2UṭµF
  • [Try it online!][TIO-kpn42hiq]
  • [Jelly]: https://github.com/DennisMitchell/jelly
  • [TIO-kpn42hiq]: https://tio.run/##y0rNyan8//9Rw8yg0GKj0Ic71x7a6vbf0CDocPujpjXu/wE "Jelly – Try It Online"
  • (Also posted on [Stack Exchange](https://codegolf.stackexchange.com/a/229217/68942) by myself)
  • ```
  • ’RUs2UṭµF Main Link
  • ’ decrement
  • R range
  • U reverse
  • s2 slice into chunks of length 2
  • U reverse each chunk
  • ṭ tack; prepend the input
  • µ (new chain)
  • F flatten the list
  • ```
#2: Post edited by user avatar hyper-neutrino‭ · 2021-06-07T21:21:52Z (almost 3 years ago)
  • # [Jelly], 9 bytes
  • ’RUs2UṭµF
  • [Try it online!][TIO-kpn42hiq]
  • [Jelly]: https://github.com/DennisMitchell/jelly
  • [TIO-kpn42hiq]: https://tio.run/##y0rNyan8//9Rw8yg0GKj0Ic71x7a6vbf0CDocPujpjXu/wE "Jelly – Try It Online"
  • # [Jelly], 9 bytes
  • ’RUs2UṭµF
  • [Try it online!][TIO-kpn42hiq]
  • [Jelly]: https://github.com/DennisMitchell/jelly
  • [TIO-kpn42hiq]: https://tio.run/##y0rNyan8//9Rw8yg0GKj0Ic71x7a6vbf0CDocPujpjXu/wE "Jelly – Try It Online"
  • ```
  • ’RUs2UṭµF Main Link
  • ’ decrement
  • R range
  • U reverse
  • s2 slice into chunks of length 2
  • U reverse each chunk
  • ṭ tack; prepend the input
  • µ (new chain)
  • F flatten the list
  • ```
#1: Initial revision by user avatar hyper-neutrino‭ · 2021-06-07T21:13:19Z (almost 3 years ago)
# [Jelly], 9 bytes

    ’RUs2UṭµF

[Try it online!][TIO-kpn42hiq]

[Jelly]: https://github.com/DennisMitchell/jelly
[TIO-kpn42hiq]: https://tio.run/##y0rNyan8//9Rw8yg0GKj0Ic71x7a6vbf0CDocPujpjXu/wE "Jelly – Try It Online"