Draw a ladder and slide Your task is to create a program or function that takes, as input, a natural number (n) between 1 and 25 (inclusive) and prints an isometric representation of a slide and ladder with n number of rungs.

Ladder and slide specifications

The ladder is always oriented on the left and the slide on the right. We're viewing it from the ladder side, so part of the slide is obscured at the top three levels. The rungs are represented by four dashes (----) and the sides of the ladder and slide by slashes (/ and \). The following is a diagram to represent the patterns of spaces needed for a slide with five rungs.

Slide              Blank space count
    /----/\        1234/----/\ 
   /----/  \       123/----/12\ 
  /----/    \      12/----/1234\ 
 /----/ \    \     1/----/1\1234\ 
/----/   \    \    /----/123\1234\


Examples

&gt;&gt;1
/----/\

&gt;&gt;3
  /----/\ 
 /----/  \ 
/----/    \ 

&gt;&gt;4
   /----/\ 
  /----/  \ 
 /----/    \ 
/----/ \    \ 

&gt;&gt;10
         /----/\ 
        /----/  \ 
       /----/    \ 
      /----/ \    \ 
     /----/   \    \ 
    /----/     \    \ 
   /----/       \    \ 
  /----/         \    \ 
 /----/           \    \ 
/----/             \    \ 


This is code-golf, so the answer with the lowest byte count wins.

Note: trailing white space is acceptable in the output, as long as it doesn't exceed the length of the line.
Retina, 81 72 52 bytes

Byte count assumes ISO 8859-1 encoding.

.+
$* /\    \
^.

+` /(.+)$
$&amp;¶$%`/  $1
/.{5}
/----/


Try it online!

Explanation

The program consists of four stages, all of which are regex substitutions (with a couple of Retina-specific features). I'll use input 5 as an example for the explanation.

Stage 1

.+
$* /\    \


This turns the input n into n spaces followed by /\    \ which will become the top of the ladder/slide:

     /\    \


For now, we'll just show the slide in full and represent the ladder only by its left-hand /.

Stage 2

^.



Unfortunately, n spaces are one more than we need, so we remove the first character again. We've now got:

    /\    \


Stage 3

+` /(.+)$
$&amp;¶$%`/  $1


Time to expand the complete structure. Knowing where the top is, is sufficient to build the entire thing, because we can simply extend it one line at a time, moving the ladder and the slide apart by two spaces.

The + tells Retina to repeat this stage in a loop until the output stops changing (in this case, because the regex stops matching). As for the regex itself, we simply match the / on the last line and everything after it and we also match one space in front of it, which means this can no longer match once / has reached the first column.

Here's what we replace this with:

 $&amp;    The match itself. We don't want to remove the line we already have.
 ¶     A linefeed, because we want to append a new line.
 $%`   This is a very recent addition to Retina: it's like the normal $` but
      is bounded by linefeeds. That means this inserts everything in front
      of the match which is on the same line. In particular this one space
      less than the indentation of the matched line, hence we are shifting
      the / one column left.
 /     A literal /, representing the left edge of the ladder.
&gt;  &lt;   Two spaces, so that we can shift the slide one column right.
 $1    Capturing group 1 which contains the slide and its separation from
      the ladder.


So at each iteration, this adds one line to the string, until we end up with this:

    /\    \
   /  \    \
  /    \    \
 /      \    \
/        \    \


Stage 4

/.{5}
/----/


All that's left is getting the ladder right. That's really simple, we just match the / and the next 5 characters and insert the correct ladder representation, thereby overriding the slide or spaces that are already there:

    /----/\
   /----/  \
  /----/    \
 /----/ \    \
/----/   \    \