Skip to main content
added 149 characters in body
Source Link
dylnan
  • 5.4k
  • 2
  • 16
  • 33

Jelly, 4 bytes

R»µ¡

Try it online!

R»µ¡
R     Range. 2 -> [1, 2]
 »    Max between left arg and right arg. Vectorizes. -> [2, 2]
  µ   Separates into a new chain.
   ¡  Repeat 2 times. After another iteration this yields [[2, 2], [2, 2]].

Same thing but with a single monad and no need for the chain separator:

4 bytes

»€`¡

Jelly, 4 bytes

R»µ¡

Try it online!

R»µ¡
R     Range. 2 -> [1, 2]
 »    Max between left arg and right arg. Vectorizes. -> [2, 2]
  µ   Separates into a new chain.
   ¡  Repeat 2 times. After another iteration this yields [[2, 2], [2, 2]].

Jelly, 4 bytes

R»µ¡

Try it online!

R»µ¡
R     Range. 2 -> [1, 2]
 »    Max between left arg and right arg. Vectorizes. -> [2, 2]
  µ   Separates into a new chain.
   ¡  Repeat 2 times. After another iteration this yields [[2, 2], [2, 2]].

Same thing but with a single monad and no need for the chain separator:

4 bytes

»€`¡
Source Link
dylnan
  • 5.4k
  • 2
  • 16
  • 33

Jelly, 4 bytes

R»µ¡

Try it online!

R»µ¡
R     Range. 2 -> [1, 2]
 »    Max between left arg and right arg. Vectorizes. -> [2, 2]
  µ   Separates into a new chain.
   ¡  Repeat 2 times. After another iteration this yields [[2, 2], [2, 2]].