Take two lists of non-negative integers, and output an ASCII-box as it's defined below.
- Corners and intersections are pluses:
+
(ASCII-code 43) - Vertical lines are bars
|
(ASCII-code 124) - Horizontal lines are minuses
-
(ASCII-code 45)
The first input list specifies the number of minuses between each plus sign, in the horizontal direction.
The second input list specifies the number of bars between each plus sign, in the vertical direction.
It's easier to explain with a few examples:
0 // No minuses between each + sign
0 // No bars between + signs
++
++
------------------
1 2 // First a single minus, then two minuses
1 2 // First one bar, then two bars
+-+--+
| | |
+-+--+
| | |
| | |
+-+--+
------------------
1 0 3 0 2 0
2 1 0 0
+-++---++--++
| || || ||
| || || ||
+-++---++--++
| || || ||
+-++---++--++
+-++---++--++
+-++---++--++
Clarifications:
- Input order and format are optional
- Only the boxes should be printed/displayed, but a trailing space or newlines are accepted.
- You may optionally add 1 to all input values if that's more convenient. The second example would then be:
2 3; 2 3
.
This is code golf, so the shortest code in bytes win.