Write a program that takes in a string containing only spaces, newlines, and angle brackets: <
, >
(chevrons). Output a string of spaces, newlines, and slashes: /
, \
(soliduses) whose shapes correspond to the input, but rotated a quarter turn clockwise, with a column of spaces inserted between each row of the original input (for aesthetics).
For example, if the input is this:
<>
The output would be this:
/\
\/
If the input is this:
><<<>
<><
The output would be this:
\/
/\ /\
\/ /\
/\ /\
\/
If the input is this:
>> <<
<> <>
<
><
The output would be this:
/\ \/
\/ \/
\/ /\
/\
/\ /\
\/ /\
Notice how there is a single column of spaces between the original input rows in the last two examples.
You may write a full program that takes the input in any usual way (command line, stdin) and prints the output, or you may write a function with a string argument, that prints or returns the output.
Empty leading and trailing rows or columns of whitespace in the input do not need to be present in the output. Additionally, there may be any amount of leading and/or trailing spaces and/or newlines in the output, in any locations, as long as the resulting shapes are correct. In other words, the translation of the ascii art does not matter, only the shapes and their relation to one another do.
You may optionally assume the input has a trailing newline.
The shortest code in bytes wins.