Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

3 of 3
Commonmark migration

APL (Dyalog Unicode), 4 bytes

\⍨⍳9

Try it online!

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
AviFS
  • 2.2k
  • 18
  • 27

AltStyle によって変換されたページ (->オリジナル) /