#Dyalog APL, 1 byte
Dyalog APL, 1 byte
⍳
This has worked since the very first APL, back in the seventies:
⍳⎕
No built-in (also always worked):
+\⎕⍴1
Cumulative sum +\
of input ⎕
number of ⍴
1s.
Obviously you will need enough memory to contain the result. Here is a print loop to avoid memory full:
{⎕←1+⍵}⍣⎕⊢0
{
return and print ⎕←
1+ argument ⍵
}
applied ⍣
input ⎕
times to ⊢
0.