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 Answer

Commonmark migration
Source Link

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

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

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
added 30 characters in body
Source Link
AviFS
  • 2.2k
  • 18
  • 27

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

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: ⍳5 = 1 2 3 4 5
Expand: 2 3 \ 1 4 = 1 1 4 4 4
Commute: +⍨4 = 4 + 4 = 8

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

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: ⍳5 = 1 2 3 4 5
Expand: 2 3 \ 1 4 = 1 1 4 4 4
Commute: +⍨4 = 4 + 4 = 8

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