Skip to main content
typo fix
Source Link
Neil
  • 184.4k
  • 12
  • 76
  • 290

Retina, 6 bytes

?+`$ x 

Try it online! Outputs an average of 1 x. Explanation: The ? causes the loop created by + to run with ana geometric distribution with a mean of 1. Each iteration of the loop appends an x to current value, which is then output when the loop terminates.

Retina, 6 bytes

?+`$ x 

Try it online! Outputs an average of 1 x. Explanation: The ? causes the loop created by + to run with an geometric distribution with a mean of 1. Each iteration of the loop appends an x to current value, which is then output when the loop terminates.

Retina, 6 bytes

?+`$ x 

Try it online! Outputs an average of 1 x. Explanation: The ? causes the loop created by + to run with a geometric distribution with a mean of 1. Each iteration of the loop appends an x to current value, which is then output when the loop terminates.

Source Link
Neil
  • 184.4k
  • 12
  • 76
  • 290

Retina, 6 bytes

?+`$ x 

Try it online! Outputs an average of 1 x. Explanation: The ? causes the loop created by + to run with an geometric distribution with a mean of 1. Each iteration of the loop appends an x to current value, which is then output when the loop terminates.