Skip to main content
added 26 characters in body
Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

Jellyfish, 1212 10 bytes

Thanks to Zgarb for saving 2 bytes.

P#;#'*P$'*
 E 10&;10

Try it online!Try it online!

Explanation

Using more conventional notation, this program represents the following expression:

P( #$(10, ;(#&;(10), '*)) ) )

#&; is repetition, so the innermost call justtakes a single value and creates a string of 10 asterisks.pair with two times that value, so ;&;(10) wraps the result in a singleton arraygives us [10 10]. Then we have another repetition to create 10 copies$ is reshape which forms a 10x10 grid of the stringasterisks. Finally, P prints the array in "matrix format" which prints each string on its own line.

Jellyfish, 12 bytes

P#;#'*
 E 10

Try it online!

Explanation

Using more conventional notation, this program represents the following expression:

P( #(10, ;(#(10, '*))))

# is repetition, so the innermost call just creates a string of 10 asterisks. ; wraps the result in a singleton array. Then we have another repetition to create 10 copies of the string. P prints the array in "matrix format" which prints each string on its own line.

Jellyfish, 12 10 bytes

Thanks to Zgarb for saving 2 bytes.

P$'*
 &;10

Try it online!

Explanation

Using more conventional notation, this program represents the following expression:

P( $( &;(10), '* ) )

&; takes a single value and creates a pair with two times that value, so &;(10) gives us [10 10]. Then $ is reshape which forms a 10x10 grid of asterisks. Finally, P prints the array in "matrix format" which prints each string on its own line.

Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

Jellyfish, 12 bytes

P#;#'*
 E 10

Try it online!

Explanation

Using more conventional notation, this program represents the following expression:

P( #(10, ;(#(10, '*))))

# is repetition, so the innermost call just creates a string of 10 asterisks. ; wraps the result in a singleton array. Then we have another repetition to create 10 copies of the string. P prints the array in "matrix format" which prints each string on its own line.