Post History
Jelly, 7 bytes œPżịẊ¥F Try it online! Takes the 1-indexed indices on the left and the list on the right How it works œPżịẊ¥F - Main link. Takes I on the left and L on the right œP - Pa...
Answer
#2: Post edited
- # [Jelly], 7 bytes
- œPżịẊ¥F
- [Try it online!][TIO-kqli98vn]
- [Jelly]: https://github.com/DennisMitchell/jelly
[TIO-kqli98vn]: https://tio.run/##y0rNyan8///o5ICjex7u7n64q@vQUrf/jxpmHF6udHTSw50zHjWtifz/P9pAx1DHSMdYx0THVMcsVkcBKGAE5ECZIHELHcvY/9FIqnTMQZIYApbGQJYh2DwDAx0TQx1zCx1jQx1jEx0j81gA "Jelly – Try It Online"
- # [Jelly], 7 bytes
- œPżịẊ¥F
- [Try it online!][TIO-kqli98vn]
- [Jelly]: https://github.com/DennisMitchell/jelly
- [TIO-kqli98vn]: https://tio.run/##y0rNyan8///o5ICjex7u7n64q@vQUrf/jxpmHF6udHTSw50zHjWtifz/P9pAx1DHSMdYx0THVMcsVkcBKGAE5ECZIHELHcvY/9FIqnTMQZIYApbGQJYh2DwDAx0TQx1zCx1jQx1jEx0j81gA "Jelly – Try It Online"
- Takes the 1-indexed indices on the left and the list on the right
- ## How it works
- œPżịẊ¥F - Main link. Takes I on the left and L on the right
- œP - Partition L after the indices in I, removing the borders
- ¥ - Group the previous 2 links as a dyad f(I, L):
- ị - Get the elements of L at the indices in I
- Ẋ - Shuffle uniformly
- ż - Zip
- F - Flatten
#1: Initial revision
# [Jelly], 7 bytes œPżịẊ¥F [Try it online!][TIO-kqli98vn] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-kqli98vn]: https://tio.run/##y0rNyan8///o5ICjex7u7n64q@vQUrf/jxpmHF6udHTSw50zHjWtifz/P9pAx1DHSMdYx0THVMcsVkcBKGAE5ECZIHELHcvY/9FIqnTMQZIYApbGQJYh2DwDAx0TQx1zCx1jQx1jEx0j81gA "Jelly – Try It Online"