Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Depth of nesting
N = 100
# Number of floats to allocate
M = 100_000
def chain(next_lambda)
lambda {
puts "."
(1..M) { rand }
the_chain = lambda { puts '.' }
N.times do |i|
the_chain = chain(the_chain)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.