Post History
BQN, 29 28 bytes (ββ""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+β Try it here! Explanation: (ββ""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+β # a function taking a single argument ββ"" # a 0-by-1 matrix (...
Answer
#3: Post edited
# BQN, 29 bytes- ```bqn
(β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ- ```
[Try it here!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAgKOKJjSIiKXvijYnijL3wnZWp4oi+y5jwnZWo4qWKy5zii4jLnOKJoPCdlal9wrTin5zijL0nQCcrMeKGk+KGlQpGIDc=)- Explanation:
- ```bqn
(β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ # a function taking a single argumentβ"" # a 1-by-0 character matrix(β""){ }Β΄ # right fold with the initial value of β""ββ½ # (but reverse the list to make it a left fold)β # range; 0 1 2 3 4 β¦ input-11β # drop the first element; 1 2 3 4 β¦ input-1'@'+ # plus the character '@' ('A' = '@'+1); "ABCDEFβ¦"{ββ½π©βΎΛπ¨β₯ΛβΛβ π©} # fold operand: π¨ - current character, π© - accumulator - the matrixβ π© # numbers of rows in the matrixβΛ # paired with itself (7 β [7,7])π¨β₯Λ # reshape π¨ that muchπ©βΎΛ # concatenate horizontally to π©ββ½ # rotate 90Β° clockwise (reverse vertically, transpose)- ```
- # BQN, <s>29</s> 28 bytes
- ```bqn
- (ββ""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+β
- ```
- [Try it here!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAgKOKNieKJjSIiKXvijYnijL3wnZWp4oi+y5jwnZWo4qWKy5zii4jLnOKJoPCdlal9wrTin5zijL0nQCcr4oaVCkYgNw==)
- Explanation:
- ```bqn
- (ββ""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+β # a function taking a single argument
- ββ"" # a 0-by-1 matrix
- (ββ""){ }Β΄ # right fold with the initial value of the 0-by-1 matrix
- ββ½ # (but reverse the list to make it a left fold)
- β # range; 0 1 2 3 4 β¦ input-1
- '@'+ # plus the character '@'; "@ABCDEFβ¦"
- {ββ½π©βΎΛπ¨β₯ΛβΛβ π©} # fold operand: π¨ - current character, π© - accumulator - the matrix
- β π© # numbers of rows in the matrix
- βΛ # paired with itself (7 β [7,7])
- π¨β₯Λ # reshape π¨ that much
- π©βΎΛ # concatenate horizontally to π©
- ββ½ # rotate 90Β° clockwise (reverse vertically, transpose)
- ```
#2: Post edited
# BQN, 28 bytes- ```bqn
- (β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ
- ```
- [Try it here!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAgKOKJjSIiKXvijYnijL3wnZWp4oi+y5jwnZWo4qWKy5zii4jLnOKJoPCdlal9wrTin5zijL0nQCcrMeKGk+KGlQpGIDc=)
- Explanation:
- ```bqn
- (β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ # a function taking a single argument
- β"" # a 1-by-0 character matrix
- (β""){ }Β΄ # right fold with the initial value of β""
- ββ½ # (but reverse the list to make it a left fold)
- β # range; 0 1 2 3 4 β¦ input-1
- 1β # drop the first element; 1 2 3 4 β¦ input-1
- '@'+ # plus the character '@' ('A' = '@'+1); "ABCDEFβ¦"
- {ββ½π©βΎΛπ¨β₯ΛβΛβ π©} # fold operand: π¨ - current character, π© - accumulator - the matrix
- β π© # numbers of rows in the matrix
- βΛ # paired with itself (7 β [7,7])
- π¨β₯Λ # reshape π¨ that much
- π©βΎΛ # concatenate horizontally to π©
- ββ½ # rotate 90Β° clockwise (reverse vertically, transpose)
- ```
- # BQN, 29 bytes
- ```bqn
- (β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ
- ```
- [Try it here!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAgKOKJjSIiKXvijYnijL3wnZWp4oi+y5jwnZWo4qWKy5zii4jLnOKJoPCdlal9wrTin5zijL0nQCcrMeKGk+KGlQpGIDc=)
- Explanation:
- ```bqn
- (β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ # a function taking a single argument
- β"" # a 1-by-0 character matrix
- (β""){ }Β΄ # right fold with the initial value of β""
- ββ½ # (but reverse the list to make it a left fold)
- β # range; 0 1 2 3 4 β¦ input-1
- 1β # drop the first element; 1 2 3 4 β¦ input-1
- '@'+ # plus the character '@' ('A' = '@'+1); "ABCDEFβ¦"
- {ββ½π©βΎΛπ¨β₯ΛβΛβ π©} # fold operand: π¨ - current character, π© - accumulator - the matrix
- β π© # numbers of rows in the matrix
- βΛ # paired with itself (7 β [7,7])
- π¨β₯Λ # reshape π¨ that much
- π©βΎΛ # concatenate horizontally to π©
- ββ½ # rotate 90Β° clockwise (reverse vertically, transpose)
- ```
#1: Initial revision
# BQN, 28 bytes ```bqn (β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ ``` [Try it here!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAgKOKJjSIiKXvijYnijL3wnZWp4oi+y5jwnZWo4qWKy5zii4jLnOKJoPCdlal9wrTin5zijL0nQCcrMeKGk+KGlQpGIDc=) Explanation: ```bqn (β""){ββ½π©βΎΛπ¨β₯ΛβΛβ π©}Β΄ββ½'@'+1ββ # a function taking a single argument β"" # a 1-by-0 character matrix (β""){ }Β΄ # right fold with the initial value of β"" ββ½ # (but reverse the list to make it a left fold) β # range; 0 1 2 3 4 β¦ input-1 1β # drop the first element; 1 2 3 4 β¦ input-1 '@'+ # plus the character '@' ('A' = '@'+1); "ABCDEFβ¦" {ββ½π©βΎΛπ¨β₯ΛβΛβ π©} # fold operand: π¨ - current character, π© - accumulator - the matrix β π© # numbers of rows in the matrix βΛ # paired with itself (7 β [7,7]) π¨β₯Λ # reshape π¨ that much π©βΎΛ # concatenate horizontally to π© ββ½ # rotate 90Β° clockwise (reverse vertically, transpose) ```