[Question]
  [
# Background
When I was younger, I was taught a method of drawing a weird "S" shape, that I (along with my classmates) found fascinating. Today, I rediscovered it, and due to its formulaic approach to drawing it, thought it could lead to an interesting challenge :P
# Drawing the "S"
The S can be drawn by following these simple steps:
First, draw 2 rows of three vertical lines like so
```
| | |
| | |
```
Next, connect the top left line with the bottom middle line and the top middle with the bottom right line to produce
```
| | |
 \ \
| | |
```
Finally, draw a top and bottom on the currently drawn image so that it ends up looking like
```
  ^
 / \
| | |
 \ \
| | |
 \ /
  v
```
As you can see, this results in an "S" shape. When extended however (drawing it with more than 2 rows), it produces a very interesting pattern. Your task is reproduce this interesting pattern.
# Task
Given an integer where `n >= 2`, output The S with `n` rows to be made from it. Output may be returned from a function, and input may be taken in standard methods. Trailing/leading whitespace for both the overall image, as well as each line, is fine. However, leading line spaces must be consistent so that the " isn't broken. You may output as a list of lines.
# Test cases
```
input
output
---
2
  ^
 / \
| | |
 \ \
| | |
 \ /
  v
---
8
  ^
 / \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ /
  v
---
10
  ^
 / \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ \
| | |
 \ /
  v
```
This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so shortest code wins! Good luck,
  
[Answer]
# [Python 2](https://docs.python.org/2/), 47 bytes
```
lambda k:'  ^\n / '+'\\\n| | |\n \ '*k+'/\n  v'
```
[Try it online!](https://tio.run/##K6gsycjPM/qfZhvzPycxNyklUSHbSl1BIS4mT0FfQV1bPSYmJq9GAQiBAjEK6lrZ2ur6QKZCmfr/gqLMvBKFNA0Tzf8A "Python 2 – Try It Online")
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), ~~73~~ ~~69~~ ~~66~~ ~~64~~ 62 bytes
Two less bytes and perl-like appearance thanks to Barodus. Didn't think of using int? for nulls.
```
n=>$@"  ^
 / {string.Join(@"\
| | |
 \ ",new int?[++n])}/
  v"
```
[Try it online!](https://tio.run/##hY3BCoJAGITv@xSDdFA0hU5BaULQIerUoYMayLbKgv0L7maF@ey24aVbM8f5ZobrOVetGHlTao0n65k2pZEcnZJXHEtJcLVpJdVZgbKttWcRWJ1e2ohbuLsTX0syASYqQYV4pDiZpQ5wYYjQT0m4V5Lc1MnZG9YMOZyAxAO2vcl8nwpviOx054yr34etIq0aEZ5bacRBknArd@F5f5nllxnYMH4A "C# (.NET Core) – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 48 ~~56 59 61~~ bytes
```
lambda k:'  ^\n / %s/\n  v'%('\\\n| | |\n \ '*k)
```
[Try it online!](https://tio.run/##JYjRCgIhFAV/5byI3ghs683oTy4LRmuJdRVXFoL9dxNiHmaY8m2vLJcebtzf/nN/eCSngZkFFmq1w9i0MpqZZcdgHIY@JOohV0REQfXyXMz5OJ3IlRqlmWAi0fXf1H8 "Python 3 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~27~~ 26 bytes
```
…^
/ð"\
| | |
\ "I×…/
vJ.c
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UcOyOC79wxuUYrhqFICQK0ZByfPwdKCwPleZl17y//9GAA "05AB1E – Try It Online")
**Alternate 27 byte version**
```
'^…/ \©IF…| |û…\ \}\®R'v».c
```
[Try it online!](https://tio.run/##MzBNTDJM/f9fPe5RwzJ9hZhDKz3dgKwahZrDu4F0jEJMbcyhdUHqZYd26yX//28EAA "05AB1E – Try It Online")
**Explanation**
```
'^                             # push "^"
  …/ \©                        # push "/ \" and store a copy in register
       IF                      # input times do:
         …| |û                 # push "| | |"
              …\ \             # push "\ \"
                  }            # end loop
                   \           # discard top of stack (the extra "\ \")
                    ®R         # push "/ \" reversed = "\ /"
                      'v       # push "v"
                        »      # join stack on newlines
                         .c    # center each row
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~34~~ ~~25~~ 23 bytes
```
" ^ /{ç'\²i|³1}/ v"¬¸ò5
```
[Test it online!](https://ethproductions.github.io/japt/?v=1.4.5&code=IiBeIC975ydcsml8szF9LyB2Iqy48jU=&input=MyAtUg==) Outputs as an array of lines; `-R` flag added to join on newlines. (Thanks @Shaggy)
~~First~~ Second attempt, might be improvable...
### How it works
```
" ^ /{ ç'\²  i |³  1}/ v"¬ ¸  ò5
" ^ /{Uç'\p2 i'|p3 1}/ v"q qS ò5   Ungolfed
                                   Implicit: U = input number
        '\p2                       Repeat a backslash twice, giving "\\".
             i     1               Insert at index 1
              '|p3                   3 vertical bars. This gives "\|||\".
      Uç                           Make U copies of this string. U = 2: "\|||\\|||\"
" ^ /{              }/ v"          Insert this into this string.    " ^ /\|||\\|||\/ v"
                         q qS      Split into chars; join on spaces."  ^   / \ | | | \ \ | | | \ /   v"
                              ò5   Split into rows of length 5.    ["  ^  "," / \ ","| | |"," \ \ ","| | |"," \ / ","  v"]
                                   Joining on newlines gives "  ^  
                                                               / \ 
                                                              | | |
                                                               \ \
                                                              | | |
                                                               \ /
                                                                v"
```
[Answer]
# [SOGL V0.12](https://github.com/dzaima/SOGL), ~~26~~ ~~25~~ 18 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
```
°I-‘*"∑ūCƨΩ)¹‘@∑5n
```
[Try it Here!](https://dzaima.github.io/SOGLOnline/?code=JUIwSS0ldTIwMTgqJTIyJXUyMjExJXUwMTZCQyV1MDFBOCV1MDNBOSUyOSVCOSV1MjAxOEAldTIyMTE1bg__,inputs=Mw__)
Uses the same strategy as [ETHproductions's Japt answer](https://codegolf.stackexchange.com/a/143349/59183)
Explanation:
```
..‘           push "\|||\"
   *          repeat input times
    "..‘      push " ^ /ŗ/ v ", with ŗ replaced with POP. The reason why there's a trailing
              space is because otherwise it didn't have enough repeating characters to compress
        @∑    join with spaces
          5n  split to line lengths of 5
```
[Answer]
# JavaScript (ES6), 60 bytes
```
n=>`  ^
 / \\
${`| | |
 \\ \\
`.repeat(n-1)}| | |
 \\ /
  v`
```
## Test Snippet
```
let f=
n=>`  ^
 / \\
${`| | |
 \\ \\
`.repeat(n-1)}| | |
 \\ /
  v`
;(I.oninput=_=>O.innerHTML=I.value+"\n"+f(+I.value))()
```
```
<input id=I type=range min=2 max=15 value=2><pre id=O></pre>
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~27~~ ~~26~~ 25 bytes
*-1 byte thanks to Carlos Alejo. -1 byte thanks to ASCII-only.*
```
  ^⸿ / ×\⸿| | |⸿ \ Ｎ/⸿  v
```
[Try it online!](https://tio.run/##S85ILErOT8z5/19JQSHu0DYFfQUlLQ2lmJiYohoFIIwpUohRUNLxzCsoLfErzU1KLdLQ1FTSBworlCn9/2/yX7fsv25xDgA "Charcoal – Try It Online") Link is to verbose version. *#charcoal-verbose-obfucation*
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 82 bytes
```
f(n){for(puts("  ^\n / \\");--n;puts("| | |\n \\ \\"));puts("| | |\n \\ /\n  v");}
```
[Try it online!](https://tio.run/##S9ZNT07@/z9NI0@zOi2/SKOgtKRYQ0lBIS4mT0FfISZGSdNaVzfPGiJcowCEQImYGLCMJqawPpBSKANqqv2fm5iZp6HJVc2lAARpGkaa1mAWRIsSlJemYQJk1f4HAA "C (gcc) – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/), ~~39~~ 37 bytes
```
say"  ^
 / ".'\
| | |
 \ 'x<>."/
  v"
```
[Try it online!](https://tio.run/##K0gtyjH9/784sVJJQSGOS0FfQUlPPYarRgEIuRRiFNQrbOz0lPS5FBTKlP7/NzT4l19QkpmfV/xf19dUz8DQAAA "Perl 5 – Try It Online")
*Shaved two bytes with @DomHastings' suggestion*
[Answer]
# [Actually](https://github.com/Mego/Seriously), 49 bytes
```
"| | |"@α;lD" \ \"@α@Z♂ii"  v"" \ /"))" / \""  ^"
```
[Try it online!](https://tio.run/##S0wuKU3Myan8/1@pRgEIlRzObbTOcVFSiFGIAbEdoh7NbMrMVFJQKFMCCeoraWoqKegDJYFCcUr//1sAAA "Actually – Try It Online")
Explanation:
```
"| | |"@α;lD" \ \"@α@Z♂ii"  v"" \ /"))" / \""  ^"
"| | |"@α                                          push a list containing n copies of the vertical lines
         ;lD" \ \"@α                               push a list containing n-1 copies of the diagonal connections
                    @Z♂i                           interleave
                        i                          flatten
                         "  v"" \ /"))             make the bottom
                                      " / \""  ^"  make the top
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 38 bytes
```
…| |ûU"  ^
 / \"XI<F„ \2×X}" \ /
  v"»
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UcOyGoWaw7tDlRQU4rgU9BVilCI8bdweNcxTiDE6PD2iVkkhRkGfS0GhTOnQ7v//jQE "05AB1E – Try It Online")
```
…| |                         # Push "| |"
    û                        # Palindromize
     U                       # Store in X
      "..."X                 # Push the top three rows
            I<F      }       # One less than input times do:
               „ \           #   Push " \"
                  2×         #   Concatenate that with itself
                    X        #   Push "| | |"
                      "..."  # Push the last two rows
                           » # Join stack with newlines
```
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), ~~101~~ ~~77~~ 73 bytes
Saved 24 bytes thanks to **i cri everytim**!  
Saved 4 bytes thanks to **Kevin Cruijssen**!
```
n=>{var s="  ^\n / ";for(;n-->0;s+="\\\n| | |\n \\ ");return s+"/\n  v";}
```
[Try it online!](https://tio.run/##hc0xC8IwEAXgvb/ikalFq@IkxHYRnHRycDAKIaYloBfIxaJof3uNuLh5b3vvgzNcGh/sYC6aGffsmXHU0Rl03p2x1Y6QcwyO2sMROrRcJIJ0uwdHe52sb2SWjuIYX1WjQTVQVT87HcCVAE6KMIWQjQ@5pLKsZ5JHlVBK0QspaVYKopDBxlsg8EhMU4dOyH6Qv89Wnthf7GQfXLQbRzZv8nlR/DWLj@mzfngD "C# (.NET Core) – Try It Online")
As per usual, string repeating in C# is a pain.
[Answer]
## [Retina](https://github.com/m-ender/retina), 38 bytes
```
.+
$*
1
¶|||¶x\\
^
 ^¶x/\
.$
/¶ v
x?
 
```
[Try it online!](https://tio.run/##K0otycxL/P9fT5tLRYvLkOvQtpqamkPbKmJiuOK4FOKALP0YLj0VLv1D2xTKuCrsuRT@/zcGAA "Retina – Try It Online")
Prints a column of leading spaces and on trailing space on each line.
### Explanation
The main byte savings come from omitting the spaces in all the literal parts and inserting them at the end. The figure is structured such that there are never two non-spaces next to each other, so if we just remove them all, we can almost fix the shape by inserting a space at every position at the end:
```
^
/\
|||
\\
|||
\/
v
```
becomes:
```
 ^ 
 / \ 
 | | | 
 \ \ 
 | | | 
 \ / 
 v 
```
That's almost correct, except for indentation. The `^` and `v` are missing two spaces. That's actually easier to fix, because if we just insert an explicit space in front of each of them, that'll result in two additional spaces at the end. The lines with the slashes are trickier because they require just one additional space. To fix this, we insert a placeholder character there (`x`). When we insert the spaces at the end, we don't just insert them for every empty match, but we optionally match that `x`. That means instead of inserting a space in front of the `x`, the `x` itself gets replaced. And then there will still be an empty match right after the `x`. That means, every `x` adds exactly one space without changing anything else. So what we want to set up is this:
```
 ^
x/\
|||
x\\
|||
x\/
 v
```
which will give us the desired result. So here's the code:
```
.+
$*
```
Convert the input to unary.
```
1
¶|||¶x\\
```
Convert each `1` to two lines with `|||` and `x\\` (and a leading linefeed).
```
^
 ^¶x/\
```
Inser the first two lines with `^` and `x/\`.
```
.$
/¶ v
```
Fix the final `x\\` by turning the last `\` into `/` and appending a line with the `v`.
```
x?
 
```
Replace each `x` or empty match with a space.
[Answer]
# [Stax](https://github.com/tomtheisen/stax), ~~21~~ 20 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
⌐èüYΩ╜yu╝√♪╪▌yº⌐▌2Σ⌠
```
[Run and debug it](https://staxlang.xyz/#p=a98a8159eabd7975bcfb0dd8dd79a7a9dd32e4f4&i=5)
Uses ETHProductions' idea.
-1 after changing `1/` to `M` (from recursive).
[Answer]
# Pyth, 46 bytes
```
"  ^
 / \\"
+*j[jd*\|3" \ \\"k))Q" \ /
  v
```
[Test suite.](https://pyth.herokuapp.com/?code=%22++%5E%0A+%2F+%5C%5C%22%0A%2B%2aj%5BKjd%2a%5C%7C3%22+%5C+%5C%5C%22k%29%29QK%0A%22+%5C+%2F%0A++v&input=3&test_suite=1&test_suite_input=1%0A2%0A3%0A4%0A5&debug=0)
[Answer]
# Pyth, 40 bytes
```
K" / \ ""  ^"Kj+b+*2+d\\b*Q]*3"| "_K"  v
```
Fairly similar to Steven Hewitt's, but developed independently.
[Try it Online](http://pyth.herokuapp.com/?code=K%22+%2F+%5C+%22%22++%5E%22Kj%2Bb%2B*2%2Bd%5C%5Cb*Q]*3%22|+%22_K%22++v&input=2&debug=0)
### Explanation
```
K" / \ ""  ^"Kj+b+*2+d\\b*Q]*3"| "_K"  v
K" / \ ""                                 Set K = " / \ "
        "  ^"                       "  v  Draw the end points.
             K                    _K      Draw the slants.
                         *Q]*3"| "        Draw the vertical bars...
              j+b+*2+d\\b                 ... interspersed with slants.
```
[Answer]
# Pyth, ~~33~~ ~~32~~ 31 bytes
Thanks Mr. Xcoder for one byte. 
```
%"  ^
 / %s/
  v"*tj\|_B" \\
| 
```
Try it online: [Demonstration](https://pyth.herokuapp.com/?code=%25%22++%5E%0A+%2F+%25s%2F%0A++v%22%2atj%5C%7C_B%22+%5C%5C%0A%7C+&input=5&test_suite_input=2%0A3%0A4%0A5%0A6&debug=0) or [Test Suite](https://pyth.herokuapp.com/?code=%25%22++%5E%0A+%2F+%25s%2F%0A++v%22%2atj%5C%7C_B%22+%5C%5C%0A%7C+&input=5&test_suite=1&test_suite_input=2%0A3%0A4%0A5%0A6&debug=0)
[Answer]
# [Retina](https://github.com/m-ender/retina), 45 bytes
This is a pretty simple solution.
```
.+
$*
^1
  ^¶ /x
$
 \ /¶  v
1
 \x
x
 \¶| | |¶
```
[**Try it online**](https://tio.run/##K0otycxL/K/qrpHA9V9Pm0tFiyvOkEtBIe7QNgX9Ci4VLoUYBX0gW6GMCygcU8FVASQPbatRAMJD2/7/N@KyAAA)
If the art could be 1-indexed instead, it'd be a bit shorter (44 bytes):
```
.+
  ^¶ /x$0$*1
$
 \ /¶  v
1
 \x
x
 \¶| | |¶
```
[Answer]
# [Pip](https://github.com/dloscutoff/pip), ~~45~~ ~~42~~ 33 bytes
```
"  ^
 / "."\
| | |
 \ "Xa."/
  v"
```
[Try it online!](https://tio.run/##K8gs@P9fSUEhjktBX0FJTymGq0YBCLkUYhSUIhL1lPS5FBTKlP7//28MAA "Pip – Try It Online")
### Explanation
The code is really simple, though the newlines make it harder to read. Here's a better way to see the structure:
```
"prefix" . "repeated" X a . "suffix"
```
The repeated element in the S-chain is
```
   \
| | |
 \
```
Take this as a literal string and repeat it `a` times (where `a` is the first command-line argument). Then prepend the prefix:
```
  ^
 /
```
and append the suffix:
```
   /
  v
```
and print.
(I like how this ended up looking kinda like a ><> program.)
[Answer]
# [AsciiDots](https://github.com/aaronduino/asciidots), 88 bytes
```
.*$"  ^"$" / \"
/>#?)--*$"| | |"$" \ \"
*#1\ /-~$"| | |"$" \ /"$"  v"
*-{-}*[<]
\#0----/
```
[Try it online!](https://tio.run/##SyxOzsxMyS8p/v9fT0tFSUEhTglI6ivEKHHp2ynba@rqAkVrFIAQJB4DEtdSNoxR0NetQxHXB1EKZUBZ3WrdWq1om1iuGGUDXSDQ///f0AAA "AsciiDots – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~47~~ ~~44~~ 43 bytes
-3 bytes thanks to [Giuseppe](https://codegolf.stackexchange.com/users/67312/giuseppe)
```
'  ^' ' / \ 'XK'| | |'XJGq:"' \'thJ]KP'  v'
```
[Try it online!](https://tio.run/##y00syfn/X11BIU5dQV1BXyFGQT3CW71GAQjVI7zcC62U1BVi1EsyvGK9A4CqytT//zcFAA "MATL – Try It Online")
[Answer]
# bash, 67 bytes
```
printf -v a %\*s $1 \ ;echo '  ^
 / '"${a// /\\
| | |
 \\ }"'/
  v'
```
[Try it online](https://tio.run/##DcLBCkBAFEDR/XzFTaMppRdbv/JSQzQ2yMgG3/7onCHmZLYfy3rO1BeRUquMb1C6aUwbAXqHEAp/RxFE1T38HKq8RRAHVzCz9gM)
[Answer]
# [Ruby](https://www.ruby-lang.org/), 39 bytes
```
->n{"  ^
 / #{"\\
| | |
 \\ "*n}/
  v"}
```
[Try it online!](https://tio.run/##KypNqvyflmf7X9cur1pJQSGOS0FfQblaKSaGq0YBCLkUYmIUlLTyavW5FBTKlGr/F5SWFCuk5UWbxv4HAA "Ruby – Try It Online")
[Answer]
# [///](https://esolangs.org/wiki////), 54 bytes
```
/*/
| | |
b//b>///b/ \\\\ \\\\/  ^
 \/ \\**> \\ \/
  v
```
[Try it online!](https://tio.run/##K85JLM5ILf7/X19Ln6tGAQi5kvT1k@z0gYS@QgwQgAl9BYU4LoUYkIiWlp0CSFSfS0Gh7P9/IwA "/// – Try It Online")
For input, change the number of asterisks
```
 \/ \\**> \\ \/ 
      ^^
```
[Answer]
## Haskell, 53 bytes
```
f n="  ^\n /"++([1..n]>>" \\\n| | |\n \\")++" /\n  v"
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00hz1ZJQSEuJk9BX0lbWyPaUE8vL9bOTkkhJiYmr0YBCIFSMTFKmtraSgr6QLZCmdL/3MTMPAVbhYLSkuCSIp88BRWFNAWL/wA "Haskell – Try It Online")
[Answer]
# Java 8, ~~93~~ 76 bytes
```
n->{String r="  ^\n / ";for(;n-->0;r+="\\\n| | |\n \\ ");return r+"/\n  v";}
```
Port of [*@IanH.*'s C# .NET answer](https://codegolf.stackexchange.com/a/143333/52210) after I golfed it a bit more.
[Try it here.](https://tio.run/##hY/NbsIwEITvPMXIJ1soP3CqZIU3KJceMUjGGGQIm8hxIiHIs6fbkmtV7e5h51tpZq92sFnTerqebpOrbdfh0wZ6LoBAycezdR7bnxX4SjHQBU4yASnN4sjD3SWbgsMWhAoTZZvnfBsrARwMoYDQ5yZKTVm2KXVcVsIYQy9wMTYGQunoUx8JcSkK1jAIPU767dD2x5odZqOhCSfcOad8@@z2sGoO@eiSv@dNn/KWUapJUu7kWv3m/ZN//MNXpZofHqdv)
[Answer]
# Excel, 60 bytes
```
="  ^
 / \
"&REPT("| | |
 \ \
",A1-1)&"| | |
 \ /
  v"
```
[Answer]
# SpecBAS - 74 bytes
```
1 INPUT n
2  ?"  ^"'" / \"'("| | |"#13" \ \"#13)*(n-1);"| | |"'" \ /"'"  v"
```
Apostrophe moves to next line, but doesn't work inside the string being repeated, so have to use `#13` to insert line feeds in that part.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~83~~, 57 bytes
```
"  ^
 / \"
1..--$args[0]|%{"| | |
 \ \"}
"| | |
 \ /
  v"
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/X0lBIY5LQV8hRonLUE9PV1clsSi9ONogtka1WqlGAQi5FGKAkrVcCJ4@l4JCmdL///8tAA "PowerShell – Try It Online")
Per @AdmBorkBork's suggestions,
* Simplified `for` by using a number range.
* Replaced `;`'s and combined strings.
* Removed an unnecessary variable definition.
]