[Question]
  [
Hold up..... this isn't trolling.
---
# Background
These days on YouTube, comment sections are littered with such patterns:
```
S
St
Str
Stri
Strin
String
Strin
Stri
Str
St
S
```
where `String` is a mere placeholder and refers to any combination of characters. These patterns are usually accompanied by a `It took me a lot of time to make this, pls like` or something, and often the OP succeeds in amassing a number of likes.
---
# The Task
Although you've got a great talent of accumulating upvotes on PPCG with your charming golfing skills, you're definitely not the top choice for making witty remarks or referencing memes in YouTube comment sections. Thus, your constructive comments made with deliberate thought amass a few to no 'likes' on YouTube. *You want this to change.* So, you resort to making the abovementioned clichéd patterns to achieve your ultimate ambition, but without wasting any time trying to manually write them.
Simply put, your task is to take a string, say `s`, and output `2*s.length - 1` substrings of `s`, delimited by a newline, so as to comply with the following pattern:
(for `s` = "Hello")
```
H
He
Hel
Hell
Hello
Hell
Hel
He
H
```
---
# Input
A single string `s`. Input defaults of the community apply.
You can assume that the input string will only contain printable ASCII characters.
---
# Output
Several lines separated by a newline, constituting an appropriate pattern as explained above. Output defaults of the community apply.
Leading and trailing **blank (containing no characters or characters that cannot be seen, like a space)** lines in the output are permitted.
---
# Test Case
A multi-word test case:
```
Input => "Oh yeah yeah"
Output =>
O
Oh
Oh 
Oh y
Oh ye
Oh yea
Oh yeah
Oh yeah 
Oh yeah y
Oh yeah ye
Oh yeah yea
Oh yeah yeah
Oh yeah yea
Oh yeah ye
Oh yeah y
Oh yeah 
Oh yeah
Oh yea
Oh ye
Oh y
Oh 
Oh
O
```
Note that there are apparent distortions in the above test case's output's shape (for instance, line two and line three of the output appear the same). Those are because we can't see the trailing whitespaces. Your program need NOT to try to fix these distortions.
---
# Winning Criterion
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest code in bytes in each language wins!
  
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 32 bytes
```
,[[<]>[.>]++++++++++.,[>>]<[-]<]
```
[Try it online!](https://tio.run/##SypKzMxLK03O/v9fJzraJtYuWs8uVhsO9HSi7exibaJ1Y21i///3z1CoTE2EEAA "brainfuck – Try It Online")
The same loop is used for both halves of the pattern.
### Explanation:
```
,             Take first input character as initial line
[             Until line to output is empty:
  [<]>        Move to beginning of line
  [.>]        Output all characters in line
  ++++++++++. Output newline
  ,           Input next character
  [>>]        Move two cells right if input character nonzero
  <[-]        Otherwise remove last character in line
  <           Move to new last character in line
]
```
[Answer]
# JavaScript (ES6), 36 bytes
```
f=([c,...r],s=`
`)=>c?s+f(r,s+c)+s:s
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zVYjOllHT0@vKFan2DaBK0HT1i7Zvlg7TaNIp1g7WVO72Kr4f3J@XnF@TqpeTn66RpqGkn@GQmVqIoRQ0tT8DwA "JavaScript (Node.js) – Try It Online")
### Commented
```
f = (             // f is a recursive function taking:
                  //   the input string split into:
  [c,             //     c   = next character (may be undefined if we've reached the end)
      ...r],      //     r[] = array of remaining characters
  s = `\n`        //   the output string s, initialized to a linefeed
) =>              // 
  c ?             // if c is defined:
    s +           //   append s (top of the ASCII art)
    f(r, s + c) + //   append the result of a recursive call to f, using r[] and s + c
    s             //   append s again (bottom of the ASCII art)
  :               // else:
    s             //   append s just once (this is the final middle row) and stop recursion
```
[Answer]
# [05AB1E (legacy)](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~4~~ 3 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
[*Crossed out `&nbsp;4&nbsp;` is no longer 4 :)*](https://codegolf.stackexchange.com/questions/170188/crossed-out-44-is-still-regular-44)
```
η.∊
```
[Try it online](https://tio.run/##MzBNTDJM/f//3Ha9Rx1d///7ZyhUpiZCCAA) or [verify all test cases](https://tio.run/##MzBNTDJM/V9TVvn/3Ha9Rx1d/3UObbP/H1xSlJmXzuWRmpOTz@WfoVCZmgghAA).
**Explanation:**
```
η     # Get the prefixes of the (implicit) input-string
 .∊   # Vertically mirror everything with the last line overlapping
      # (which implicitly joins by newlines in the legacy version of 05AB1E)
      # (and output the result implicitly)
```
In the new version of 05AB1E, and explicit `»` is required after the `η`, which is why I use the legacy version of 05AB1E here to save a byte.
---
**3 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage) alternative provided by *@Grimy*:**
```
ηû»
```
This version works in both the legacy and new version of 05AB1E.
[Try it online (legacy)](https://tio.run/##MzBNTDJM/f//3PbDuw/t/v/fP0OhMjURQgAA), [try it online (new version)](https://tio.run/##yy9OTMpM/f//3PbDuw/t/v/fP0OhMjURQgAA) or [verify all test cases (new version)](https://tio.run/##yy9OTMpM/V9TVvn/3PbDuw/t/q9zaJv9/@CSosy8dC6P1JycfC7/DIXK1EQIAQA).
**Explanation:**
```
η     # Get all prefixed of the (implicit) input-string
 û    # Palindromize each string in this list
  »   # And then join the list of strings by newlines
      # (after which the result is output implicitly)
```
[Answer]
# x86-16 machine code, IBM PC DOS, ~~44~~  ~~43~~ 39 bytes
```
00000000: d1ee ad8b d648 93b7 248a cbd0 e13a d975  .....H..$....:.|
00000010: 01fd ac86 3cb4 09cd 2186 3cb8 0d0e cd10  ....<...!.<.....
00000020: b00a cd10 e2e7 c3                        .......
```
Build and test `YT.COM` using `xxd -r` from above.
***Unassembled:***
```
D1 EE       SHR  SI, 1              ; point SI to DOS PSP at 80H (SI intialized at 100H) 
AD          LODSW                   ; load input length into AL, SI = 82H 
8B D6       MOV  DX, SI             ; save start of string pointer 
48          DEC  AX                 ; remove leading space from string length 
93          XCHG AX, BX             ; save string length in BL
B7 24       MOV  BH, '$'            ; put end-of-string marker in BH
8A CB       MOV  CL, BL             ; set up loop counter in CL
D0 E1       SHL  CL, 1              ; number of lines = 2 * string length - 1
    LINE_LOOP:
3A D9       CMP  BL, CL             ; does CL = string length?
75 01       JNZ  LINE_OUT           ; if not, go to output line
FD          STD                     ; otherwise flip DF to descend
    LINE_OUT: 
AC          LODSB                   ; increment or decrement SI
86 3C       XCHG BH, [SI]           ; swap current string byte with end of string delimiter 
B4 09       MOV  AH, 9              ; DOS API display string function 
CD 21       INT  21H                ; write substring to console 
86 3C       XCHG BH, [SI]           ; restore string byte 
B8 0E0D     MOV  AX, 0E0DH          ; AH = 0EH (BIOS tty function), AL = CR char
CD 10       INT  10H                ; write CR to console
B0 0A       MOV  AL, 0AH            ; AL = LF char
CD 10       INT  10H                ; write LF to console
E2 E6       LOOP LINE_LOOP          ; move to next line 
C3          RET                     ; return to DOS
```
***Explanation***
Loop `2 * input length - 1` for each row. The DOS API's string display function (`INT 21H,9`) writes a `$`-terminated string to the screen, so each time through the loop the character after the last to be displayed is swapped with the end-of-string terminator.
The loop counter is compared with the string length, and if it's greater (meaning the ascending part of the output) the string/swap position is incremented, otherwise it's decremented.
Standalone PC DOS executable program, takes input string from command line.
***Output***
[![enter image description here](https://i.stack.imgur.com/PlPSP.png)](https://i.stack.imgur.com/PlPSP.png)
* -1 byte use `SHR SI, 1` instead of `MOV` - thanks to [gastropner](https://codegolf.stackexchange.com/users/75886/gastropner)!
* -1 byte flipping loop comparison
* -1 byte write newline directly instead of as string
* -1 byte use `XCHG` instead of `MOV`
* -1 byte use `STD` / `LODSB` to ascend/descend SI pointer
[Answer]
# [MATL](https://github.com/lmendo/MATL), 8 bytes
```
nZv"G@:)
```
[Try it online!](https://tio.run/##y00syfn/Py@qTMndwUrz/391n8zsVIWSjMxiheT83NzUvBJFdQA "MATL – Try It Online")
Please like this post for the smiley `:)` in the code it took me a lot of time to make.
```
n  % Length of the input string
Zv % Symmetric range ([1 2 ... n ... 1])
"  % For each k in above range
G  % Push input
@: % Push [1 2 ... k]
)  % Index
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~60~~ 52 bytes
```
f=lambda s,n=1:s[n:]and[s[:n]]+f(s,n+1)+[s[:n]]or[s]
```
[Try it online!](https://tio.run/##LcgxCoAgFADQvVN8mhRbbBQ8QwcQB8NEwb6iLp7@F9TyhlfniAV3oqCzu0/voG@opeoGlXXoTTcKrRWBvS8kF3@UZrqlUBpkSAiBrUeEebmPlasFaks4WOb0AA "Python 2 – Try It Online")
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 50 bytes
```
f=lambda s,n=1:s>(x:=s[:n])and[x,*f(s,n+1),x]or[s]
```
[Try it online!](https://tio.run/##JckxCoAgFADQvVN8mrRcpCUEu0IHEAfDpMC@8m2w01vQ8paXn/tIOM2ZWgs6umvzDopALVVZWFW6GIWWO/SmiiGwr0bJRbWJTLEtJIIIJ0Jg/XrAs7ufnqsOMp14s8jbCw "Python 3.8 (pre-release) – Try It Online")
[Answer]
# [J](http://jsoftware.com/), 11 bytes
Anonymous tacit prefix function. Returns a space-padded character matrix.
```
[:(}:,|.)]\
```
[Try it online!](https://tio.run/##y/qfVmyrp2CgYKVg8D/aSqPWSqdGTzM25r8ml5KegnqarZ66go5CrZVCWjEXV2pyRr5CmoJ6cElRZl66Opzvn6FQmZoIIdT/AwA "J – Try It Online")
`]\` the list of prefixes
`[:(`…`)` apply the following function to that list
 `|.` the reverse list
 `,` prepended with
 `}:` the curtailed (without last item) list
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 31 bytes
```
{[\~](@_)[0...@_-1...0]}o*.comb
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYKvwvzo6pi5WwyFeM9pAT0/PIV7XEEgZxNbma@kl5@cm/bfmStNQCi4pysxLV9K0s9MrTqwEC/lnKFSmJkIImMR/AA "Perl 6 – Try It Online")
Anonymous code block that takes a string and returns a list of lines.
### Explanation:
```
{                      }o*.comb   # Pass the list of characters into the codeblock
 [\~](@_)                 # Triangular reduce by concatenation
                          # e.g. The list [1,2,3,4] turns into [1,12,123,1234]
         [0...@_-1        # Return the elements from 0 to length of string minus 1
                  ...0]   # And back down to 0
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [-R](https://codegolf.meta.stackexchange.com/questions/14337/command-line-flags-on-front-ends/14339#14339), 4 bytes
```
å+ ê
```
Cumulative reduce on a string.
*-1 byte thanks to @Shaggy* 
[Try it online!](https://tio.run/##y0osKPn///BSbYXDq/7/V/LPUKhMTYQQSly6QQA "Japt – Try It Online")
[Answer]
# Perl 5 (`-p`), 26 bytes
```
s,.,$\=$`.$/.$\;"$`$&
",ge
```
[TIO](https://tio.run/##K0gtyjH9/79YR09HJcZWJUFPRV9PJcZaSSVBRY1LSSc99f9/j9ScnPx/@QUlmfl5xf91C/7r@prqGRgCAA)
[Answer]
# [Japt](https://github.com/ETHproductions/japt) `-R`, ~~9~~ 7 bytes
-2 bytes thanks to [Shaggy](https://codegolf.stackexchange.com/users/58974/shaggy)
```
Êõ@¯XÃê
```
[Try it online!](https://tio.run/##y0osKPn//3DX4a0Oh9ZHHG4@vOr/fyX/DIXK1EQIocSlGwQA "Japt – Try It Online")
[Answer]
# Haskell, ~~52~~ ~~50~~ 44 bytes
```
f x=unlines$init<>reverse$scanr(\_->init)x x
```
* -2 bytes by a variant of [Ørjan Johansen's trick](https://codegolf.stackexchange.com/a/177153/81540)
* -6 bytes by [taking advantage of `instance Semigroup b => Semigroup (a -> b)`](https://codegolf.stackexchange.com/a/177774/81540)
[Try it online!](https://tio.run/##LY2xCsJAEER7v2KQFAmYgGJhoQFRUCsLLQU5w8YsXu7C7UWTr48nkV1eMTs7Uyl5kdYD1411HnvlVXahmp/Otg3ieJ0nCdIUvmJBWGt0D0MFiSjX40GFaoVwPZ1/V/GsdfDgcNxhlS3CYBueyr@wzOazMepj3SuQfQVjMbZLNpnUig02aFp/8Q4RSkzPFXpSI6ZDiW7TGs2GJGLDfp07epMTiqRQxsW3e5r/9KRDNwxf "Haskell – Try It Online")
[Answer]
# [R](https://www.r-project.org/), ~~79~~ ~~65~~ ~~62~~ 58 bytes
```
write(substring(s<-scan(,""),1,c(1:(r=nchar(s)),r-1:r)),1)
```
[Try it online!](https://tio.run/##K/r/v7wosyRVo7g0qbikKDMvXaPYRrc4OTFPQ0dJSVPHUCdZw9BKo8g2LzkjsUijWFNTp0jX0KoISBtq/g8G6/gPAA "R – Try It Online")
*-14 by Giuseppe's superior function knowledge*
*-3 with cleaner indexing*
*-4 thanks to Nick Kennedy and Giuseppe's move to `scan` and `write`*
Avoiding loops (and `substr`) is nice.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~5~~ 4 bytes
*-1 byte thanks to [@JonathanAllan](https://codegolf.stackexchange.com/users/53748/jonathan-allan)!*
```
¹ƤŒḄ
```
[Try it online!](https://tio.run/##y0rNyan8///QzmNLjk56uKPl/@H2yP//lTyAwvmKSgA "Jelly – Try It Online") I think this is my second Jelly answer? ~~I don't know if this is optimal.~~ I am more convinced of it being optimal. Returns an array of lines.
## Explanation
```
¹ƤŒḄ     input: "Hi!"
¹Ƥ       prefixes of the input: [["H"], ["H", "i"], ["H", "i", "!"]]
  ŒḄ     bounce, using each array: [["H"], ["H", "i"], ["H", "i", "!"], ["H", "i"], ["H"]]
```
Another approach, proposed by @JonathanAllan, is `;\ŒḄ`, which cumulatively reduces (`\`) concatenation (`;`), which is another way to generate prefixes.
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 48 bytes
```
lambda s,r='':(l:=[r:=r+c for c in s])+l[-2::-1]
```
[Try it online!](https://tio.run/##FcixCoAgEADQva84WlKsoVriwC@xBrOswEwuB/t6wze@8MXz8eMUKFs5Z6fvddPwtiSbBplDqQglCQP2ITBweXgXLpzqBsSuX3LpVNqyWq9m2@1Rc6wg0OUjSzz/ "Python 3.8 (pre-release) – Try It Online")
Uses [assignment expressions](https://www.python.org/dev/peps/pep-0572/) with `:=` to [accumulate a list of prefixes](https://codegolf.stackexchange.com/a/180041/20260) and then again to save the result to concatenate its reverse (without the first char).
# [Python 2](https://docs.python.org/2/), 51 bytes
```
f=lambda s,l=[]:s and f(s[:-1],[s]+l)or l+l[-2::-1]
```
[Try it online!](https://tio.run/##FcoxDoAgDEDR3VM0TBB0kJHEkxAGEFGTWog46Omrjv/l1@faChnmPGE4YgrQepyctw0CJciyOTuMvnfNa1TlBNToBmN/5Pz1DTt9mwhxTktehbId1HOnS96KXw "Python 2 – Try It Online")
We almost have the following nice 45-byte solution, but it has the original string twice and I don't see a short way to fix this.
```
f=lambda s,l=[]:s and f(s[:-1],[s]+l+[s])or l
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P802JzE3KSVRoVgnxzY61qpYITEvRSFNozjaStcwVie6OFY7RxtIauYXKeT8TwOSFQqZeUAFSolJySmpaelKmlZcCgVFmXklGhWa/wE "Python 2 – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 5 bytes
```
Ｇ^Ｌθθ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z8gP6cyPT9PwypOR8EnNS@9JEOjUFNHoVDT@v9//wyFytRECMH1X7csBwA "Charcoal – Try It Online") Link is to verbose version of code. Explanation: `Ｇ` draws a filled polygon, `^` specifies that the sides are down right and down left (the polygon then automatically closes itself), `Ｌθ` specifies the length of those sides as being the length of the original input and the final `θ` specifies the fill string.
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), ~~123~~ ~~109~~ ~~94~~ ~~84~~ 74 bytes
Assumes we can return a char array array (I believe we can, as a char array is a valid representation for a string and a string array is a valid representation for multiple lines)
```
a=>new int[a.Length*2-1].Select((b,i)=>a.SkipLast(Math.Abs(a.Length-i-1)))
```
[Try it online!](https://tio.run/##TY7BasJAEEDvfsXixdmSLNhrzIKIAUtKCyn00HqYLIMZjBPZXVv9@nRpELwMD@Yx81zIXeCxuohbhehZDtluK5cTeWx7Wj2y69Bba1VVlSOWVuhXscQvNDXJIXZPz/lybxrqyUWANmNdWjTNkc81hgivGDuzbgPc/ZzzpdZ6LGY/6JWnoMp0GuZvnboRTmOui9l7ioqQ9ok3g4ShJ/PpOVLNQjA1m5eBBRbfssiSeI@4TpHNvwJX8zGsvccbpK@PXIx/ "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 9 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?")[SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set")
Anonymous tacit prefix function. Returns list of strings.
```
(⊢,1↓⌽),\
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///X@NR1yIdw0dtkx/17NXUifmf9qhtwqPevkd9Uz39H3U1H1pv/KhtIpAXHOQMJEM8PIP/pymoB5cUZealq3MBmf4ZCpWpiRBCHQA "APL (Dyalog Unicode) – Try It Online")
`,\` the list of prefixes (lit, the cumulative concatenation)
`(`…`)` apply the following function to that list:
 `⌽` the reversed list
 `1↓` drop the first item
 `,` prepend
 `⊢` the unmodified list
[Answer]
# [Attache](https://github.com/ConorOBrien-Foxx/Attache), 15 bytes
```
Bounce@Prefixes
```
[Try it online!](https://tio.run/##SywpSUzOSP2fpmBl@98pvzQvOdUhoCg1LbMitfh/Wj5QVMErPzNPLSdNQVlZIY2LK6AoM68kOi0/Wsk/Q6EyNTFDUSk29j8A "Attache – Try It Online")
Pretty simple. `Bounce`s (appends reverse without center) the `Prefixes` of the input. 
Alternatively, **21 bytes:** `Bounce@{_[0..0:~-#_]}`, re-implementing prefix.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog) (v2), 6 bytes
```
a₀ᶠ⊆.↔
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/P/FRU8PDbQsedbXpPWqb8v@/UmISUDYxBUQp/Y8CAA "Brachylog – Try It Online")
Function submission, returning an array of lines. Loosely based on [@Fatalize's answer](https://codegolf.stackexchange.com/a/180542/76359).
## Explanation
```
a₀ᶠ⊆.↔
    .↔  Find a palindrome
   ⊆      that contains, in order,
  ᶠ       all
a₀        prefixes of {the input}
```
Tiebreak order here is set by the `⊆`, which, when used with this flow pattern, prefers [the shortest possible output, tiebroken by placing the given elements as early as possible](https://tio.run/##SypKTM6ozMlPN/r//1FX28NtCw5tOrTp//9oQx0jHWMdk9j/UQA "Brachylog – Try It Online"). The shortest possible output is what we want here (due to it not being possible to have any duplicate prefixes), and placing the given elements (i.e. the prefixes) as early as possible will place them in the first half (rounded up) of the output. Given that we're also requiring them to be placed in the same order, we happen to get exactly the pattern we need even though the description we gave Brachylog is very general; the tiebreaks happen to work out exactly right, causing Brachylog to pick the output we want rather than some other output that obeys the description.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 46 bytes
```
($l=$args|% t*y|%{($s+=$_);++$i})+$l[$i..0]|gu
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfmvkqZgq1D9X0Mlx1YlsSi9uEZVoUSrska1WkOlWNtWJV7TWltbJbNWU1slJ1olU0/PILYmvfR/LReXGlCnB9CEfDBLyT9DoTI1EUIo/QcA "PowerShell – Try It Online")
---
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 42 bytes (YouTube special, dirty)
It is known that the maximum length of a comment on youtube is 10,000 characters. Ok, use this as the upper limit.
```
($l=$args|% t*y|%{($s+=$_)})+$l[1e4..0]|gu
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfmvkqZgq1D9X0Mlx1YlsSi9uEZVoUSrska1WkOlWNtWJV6zVlNbJSfaMNVET88gtia99H8tF5caUJcHUHc@mKXkn6FQmZoIIZT@AwA "PowerShell – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~51~~ ~~42~~ 40 bytes
```
f=->s,i=1{s[i]?[t=s[0,i],*f[s,i+1],t]:s}
```
[Try it online!](https://tio.run/##KypNqvz/P81W165YJ9PWsLo4OjPWPrrEtjjaQCczVkcrLRoorm0Yq1MSa1Vc@7@gtKRYIS1ayT9DoTI1EUIoxf4HAA "Ruby – Try It Online")
Thanks to Doorknob for -2 bytes.
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 90 bytes
This can probably be golfed alot more, [Arnauld](https://codegolf.stackexchange.com/a/180514/84942) already has a way shorter one but I had fun atleast!
```
s=>{a=[];for(c=s.length-1;c--;)a[c]=s.slice(0,c+1);return[...a,s,...a.reverse()].join`\n`}
```
[Try it online!](https://tio.run/##JchRCgIhEIDhq/S2Sjq0z2JX6ACbsDKNuy6i4dhCRGe3opf/g3/zu2es8d50LjfqwXa255e3kzOhVIGWIVFe2qpHg1ob6Sd038kpIomTwuMoTaX2qHkCAK9Y/YBKO1UmIR1sJeb5mud3x5K5JIJUFhHEcFkPT/L/DFKa/gE "JavaScript (Node.js) – Try It Online")
[Answer]
# [SNOBOL4 (CSNOBOL4)](http://www.snobol4.org/csnobol4/), 118 bytes
```
	N =INPUT
	L =1
1	X =LT(X,SIZE(N)) X + 1	:F(D)
O	N ARB . OUTPUT POS(X)	:($L)
D	X =GT(X) X - 1	:F(END)
	L ='D'	:(O)
END
```
[Try it online!](https://tio.run/##K87LT8rPMfn/n9NPwdbTLyA0hIvTR8HWkMuQM0LB1idEI0In2DPKVcNPU1MhQkFbwZDTyk3DRZPLH6jeMchJQU/BPzQEqEshwD9YI0KT00pDxUeTywWk2R2oGaRJF6LJ1Q@oDWS2uos6UJm/JhdQ5P//4JKizLx0AA "SNOBOL4 (CSNOBOL4) – Try It Online")
There appears to be a bug in this implementation of SNOBOL; attempting to replace the label `D` with the label `2` causes an error, although the manual for Vanilla SNOBOL indicates that (emphasis added)
> 
> If a label is present, it must begin with the first character of the line. Labels provide a name for the statement, and serve as the target for transfer of control from the GOTO field of any statement. **Labels must begin with a letter or digit, optionally followed by an arbitrary string of characters.** The label field is terminated by the character blank, tab, or semicolon. If the first character of a line is blank or tab, the label field is absent.
> 
> 
> 
My supposition is that the CSNOBOL interpreter only supports a single label that begins with an integer.
[Answer]
# APL+WIN, 31 bytes
Prompts for input of string:
```
 ⊃((⍳n),1↓⌽⍳n)↑¨(¯1+2×n←⍴s)⍴⊂s←⎕
```
Explanation:
```
(¯1+2×n←⍴s)⍴⊂s create a nested vector of the string of length =1+2x length of string
((⍳n),1↓⌽⍳n)↑¨ progressively select elements from each element of the nested vector 
              following the pattern 1  2 ...to n to n-1 ... 1
⊃ convert nested vector into a 2d array.
```
[Answer]
# [F# (.NET Core)](https://www.microsoft.com/net/core/platform), ~~67~~ 61 bytes
```
let l=s.Length
[1..l*2-1]|>Seq.map(fun i->s.[..l-abs(i-l)-1])
```
[Try it online!](https://tio.run/##HYq9CsIwEID3PsVxILRCDurezA5uHatDDEkNnJfai1vfPQbH7yeq8XkPlUMBhQnwGpgz/pknpVuQtby6ZSTi88WMj8PO4UNvt/XxK5CMVVpaM@6pfTI8tGWoh4W57ElW8lm8K4B3QWh2a7JEATwpdvUH "F# (.NET Core) – Try It Online")
Input is a `string` and output is a `seq<string>`
Another solution could be `let f(s:string)=for i=1 to s.Length*2-1 do printfn"%s"s.[..s.Length-abs(i-s.Length)-1]` for 80ish bytes... I am not sure that it is worth looking into.
[Answer]
# [sed](https://www.gnu.org/software/sed/), 31 35 bytes
```
:x
h
s/.\n.*\|.$//
/^$/{x;q}
H
G
bx
```
[Try it online!](https://tio.run/##K05N0U3PK/3/36qCK4OrWF8vJk9PS1@fSz9ORb@6wrqwlsuDy50rqeL//5DU4pLMvHSFjNScnHwA "sed – Try It Online")
# Explanation
At the beginning of each iteration of the loop, pattern space is some "central chunk" of the desired output, and each loop adds a shortened copy to the top and bottom.
```
:x                 
h                  Copy the current chunk to hold space
s/.\n.*\|.$//      Remove the last letter of the first line, and all other lines (if there are any)
/^$/{x;q}          If pattern space is empty we're done; output hold space
H                  Add the shortened line to the end of hold space
G                  and add the new hold space to pattern space.
bx                 
```
[Answer]
# [J](http://jsoftware.com/), 12 bytes
```
]\,[:}.@|.]\
```
[Try it online!](https://tio.run/##y/qfVmyrp2CgYKVg8D82RifaqlbPoUYvNua/JpeSnoJ6mq2euoKOQq2VQloxF1dqcka@QpqCenBJUWZeujqc75@hUJmaCCHU/wMA "J – Try It Online")
Still 1 byte longer than Adám's
# [K (oK)](https://github.com/JohnEarnest/ok), ~~12~~ 11 bytes
-1 byte thanks to ngn
```
{x,1_|x}@,\
```
[Try it online!](https://tio.run/##y9bNz/7/P82qukLHML6motZBJ@Z/moKSf4ZCZWoihFD6DwA "K (oK) – Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~68~~ ~~67~~ ~~64~~ 59 bytes
thanks @ceilingcat for -6
thanks @gastropner for -5
```
i,j;f(char*s){for(j=1;i+=j;puts(""))j-=2*!s[write(1,s,i)];}
```
[Try it online!](https://tio.run/##fY2xDoIwGITn9ilKE5MWSxA307C7OToAJk0t8DdQDK0xSnh2hLh7w930faeTRutlAWFlzXSrxtjzqR5GZvNMwj638vEMnlHKuU3yYxz54jVCMCwTXgCv5LxsFNFFdthSSYx7BY7xCSOvlasZ3RW30lWlo4JoLjFaj9bBKE0JOAigOviAa1ZHhVFvem8C04IcBDlt2ZC/pnm5tORt1K/w2XTdIMh1GLt79AU "C (gcc) – Try It Online")
[Answer]
# x86-16 machine code, IBM PC-DOS, 33 bytes
Hexdump:
```
00000000: bf 82 00 91 89 fa e8 0a 00 74 06 41 eb f8 e8 02  .........t.A....
00000010: 00 e2 fb b4 40 cd 21 b0 0d ae cd 29 b0 0a cd 29  ....@.!....)...)
00000020: c3                                               .
```
Commented assembly:
```
        [org 0x100]
start:
        ; DI <- first command line argument
        mov     di, 0x0082
        ; DOS startup state abuse 1: set CX to zero by swapping AX (0x0000)
        xchg    cx, ax
        ; DX <- DI
        mov     dx, di
.loop1:
        ; A multitasking loop.
        ; This both prints the string up to the full length and counts
        ; the chars by scanning for '\r'.
        ; Print DS:DX(CX)
        ; We test for the end of string when printing
        ; the newline by using SCASB.
        call    putsn
        ; If the SCASB returned true, break to the end of .loop2
        ; We don't go to the top because it would print the full
        ; length string twice.
        jz      .next
        ; Increment the length and character counter
        inc     cx
        ; Loop to loop1
        jmp     .loop1
        
.loop2: ; Shortening loop
        ; Print
        call    putsn
.next:
        ; while (--CX)
        loop    .loop2
        ; Fallthrough: prints an empty line (as CX is 0) and exits
        ; Prints CX chars from DX, followed by a newline.
putsn:
        ; DOS startup state abuse 2: BX is 0x0000.
        ; DOS lets you write to STDIN and it still prints to the screen.
        ; Why? I have no idea. It's very convenient though. Note that
        ; this behavior is consistent on DOS 6.22 and FreeDOS 1.3rc4.
        ;
        ; write(0, argv, CX)
        mov     ah, 0x40
        int     0x21
        ; Print \r\n with INT 29h
        mov     al, 13
        ; Since we have \r in AL, we can use SCASB to check
        ; for the end of the string when we return.
        ; Interrupts save the flags.
        ;
        ; Yes, this reads out of bounds on the second loop,
        ; but it is DOS, who cares?
        scasb
        int     0x29
        mov     al, 10
        int     0x29
        ret
```
To be even with 640KB, I also used the command line arguments, but I made some changes:
1. I use `write` (`21:40`) instead of `puts` (`21:09`). While it does require manually printing a newline, it lets me manually control the length just by changing CX.
2. I count the length of the command line arguments on the fly.
3. I did some other tricks.
This abuses the newline rule: it actually prints empty strings at the start and end.
[![What did you expect?](https://i.stack.imgur.com/bYAG1.png)](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
]