Post History
Uiua, 19 bytes (SBCS) Defines a function that takes the string and returns a string: ⊂@#♭⍥⍉⊙(↯2_3)=3⊸⧻↘1 Uiua Pad this online Explanation ⊂@#♭⍥⍉⊙(↯2_3)=3⊸⧻↘1 "#ABC" example input ...
#1: Initial revision
# [Uiua](https://uiua.org/), 19 bytes (SBCS)
Defines a function that takes the string and returns a string:
```uiua
⊂@#♭⍥⍉⊙(↯2_3)=3⊸⧻↘1
```
[Uiua Pad this online](https://uiua.org/pad?src=0_19_0-dev_1__eJxdzzEKAjEQBdB-TxF2G-3cJGJSCK5hcw3vYhHYQMDS9CtWYit4m38SSSbN-Kf58ODDeIFwE4jX04D8QnogLYh5g_CWF7U9KsQPnl-E-9ghrVgzliT6YVfTC196z2iqIZo4ybkckZy56Royrf8nnfO-TTrP0VpjrCW0xnI81BCWwp8YpdL79gR15uca8ta7H4DkboQ=)
## Explanation
```text
⊂@#♭⍥⍉⊙(↯2_3)=3⊸⧻↘1 "#ABC" example input
↘1 "ABC" drop first character (the "#")
⊸⧻ 3 "ABC" push length, keep argument after result
=3 1 "ABC" is length equal to 3?
⊙( "ABC" dip: while ignoring top of stack
↯2_3 ["ABC" "ABC"] reshape to 2x3 array (repeating)
) 1 ["ABC" "ABC"] dip finishes
⍥⍉ ["AA" "BB" "CC"] repeat-transpose:
top of stack (here: 1) determines how often
to repeat applying the next function
(here: transpose). In other words: `if`
♭ "AABBCC" flatten array
⊂@# "#AABBCC" push '#' and join
```
