# [APL (Dyalog Unicode)], 4 bytes \⍨⍳9 [Try it online!][TIO] ### How it works ⍳9 ⍝ Integers 1..9 ⍨ ⍝ Duplicate argument on each side \ ⍝ Replicate each element *n* times ### Examples ``` Index Generator: ⍳5 = 1 2 3 4 5 Expand: 2 3 \ 1 4 = 1 1 4 4 4 Commute: +⍨4 = 4 + 4 = 8 ``` [APL (Dyalog Unicode)]: https://www.dyalog.com/ [TIO]: https://tio.run/##SyzI0U2pTMzJT/8PBDGPelc86t1sCQA "APL (Dyalog Unicode) – Try It Online"