Skip to main content
added 198 characters in body
Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282

Jelly, 33 2 bytes

-1 byte thanks to Dennis (W wraps)

;Ẇß

A link (i.e. function or method), which also works as a full program, that recursively concatenates all non-empty contiguous sublists of its input towraps its input into a list.

The input starts as zero so the first pass creates the list [0]
The second pass then makes this [0,[0]][[0]]
The third pass then makes this [[[0]]]
and so on...


Previous 3 byter, which leaks much faster:

;Ẇß

recursively concatenates all non-empty contiguous sublists of its input to its input.
[0] -> [0,[0]] -> [0,[0],[0],[[0]],[0,[0]]]
and and so on...

Jelly, 3 bytes

;Ẇß

A link (i.e. function or method), which also works as a full program, that recursively concatenates all non-empty contiguous sublists of its input to its input.

The input starts as zero so the first pass creates the list [0]
The second pass then makes this [0,[0]]
The third pass then makes this [0,[0],[0],[[0]],[0,[0]]]
and so on...

Jelly, 3 2 bytes

-1 byte thanks to Dennis (W wraps)


A link (i.e. function or method), which also works as a full program, that recursively wraps its input into a list.

The input starts as zero so the first pass creates the list [0]
The second pass then makes this [[0]]
The third pass then makes this [[[0]]]
and so on...


Previous 3 byter, which leaks much faster:

;Ẇß

recursively concatenates all non-empty contiguous sublists of its input to its input.
[0] -> [0,[0]] -> [0,[0],[0],[[0]],[0,[0]]] and so on...

added 10 characters in body
Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282

Jelly, 3 bytes

;0ß;Ẇß

A link (i.e. function or method), which also works as a full program, that recursively concatenates zeroall non-empty contiguous sublists of its input to its input. 

The input starts as zero so the first pass creates the list [0,0][0], which
The second pass then becomes longer as the program runs.

A quicker leaking 3-byter: ,0ß pairs the input with zero:makes this [0,0][0]],
The third pass then makes this [[0[0,0][0],0], [[[0[0],0][[0]],0][0,0][0]]],
and so on...

Jelly, 3 bytes

;0ß

A link (i.e. function or method), which also works as a full program, that recursively concatenates zero to its input. The input starts as zero so the first pass creates the list [0,0], which then becomes longer as the program runs.

A quicker leaking 3-byter: ,0ß pairs the input with zero: [0,0], [[0,0],0], [[[0,0],0],0], ...

Jelly, 3 bytes

;Ẇß

A link (i.e. function or method), which also works as a full program, that recursively concatenates all non-empty contiguous sublists of its input to its input. 

The input starts as zero so the first pass creates the list [0]
The second pass then makes this [0,[0]]
The third pass then makes this [0,[0],[0],[[0]],[0,[0]]]
and so on...

Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282

Jelly, 3 bytes

;0ß

A link (i.e. function or method), which also works as a full program, that recursively concatenates zero to its input. The input starts as zero so the first pass creates the list [0,0], which then becomes longer as the program runs.

A quicker leaking 3-byter: ,0ß pairs the input with zero: [0,0], [[0,0],0], [[[0,0],0],0], ...