2 added 109 characters in body
source | link

Nim, 8383 76 bytes

let s=readline(stdin)
let l=len(s)
for a in 1..l*2-1:echo(substr(s,0,ls[0..<l-abs(a-l)-1)])

Try it online!Try it online!

My first time golfing in Nim. All inputs are welcome!

This is a port of my F# and C# answer.

  • -7 bytes by using the [a..<b] instead of substr() (source)

Nim, 83 bytes

let s=readline(stdin)
let l=len(s)
for a in 1..l*2-1:echo(substr(s,0,l-abs(a-l)-1))

Try it online!

My first time golfing in Nim. All inputs are welcome!

This is a port of my F# and C# answer.

Nim, 83 76 bytes

let s=readline(stdin)
let l=len(s)
for a in 1..l*2-1:echo(s[0..<l-abs(a-l)])

Try it online!

My first time golfing in Nim. All inputs are welcome!

This is a port of my F# and C# answer.

  • -7 bytes by using the [a..<b] instead of substr() (source)
1
source | link

Nim, 83 bytes

let s=readline(stdin)
let l=len(s)
for a in 1..l*2-1:echo(substr(s,0,l-abs(a-l)-1))

Try it online!

My first time golfing in Nim. All inputs are welcome!

This is a port of my F# and C# answer.