Comment

Comment by Kafka

Here's a Ruby one-liner

    n=1234567;(1..n).reduce{|t,n|s=i=0;loop{i+=1;s+=rand;break if s>=1};t+i}.to_f/n
parent Kafka 13 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton