spec/readme/full_example_spec.rb
def generate(n)
    # invoke middleware chain
    middleware.call(n) do |n|
      # do the actual work of generating your results
      (1..n).to_a
    end
  end
# generate an array from 1 to n
generate an array from 1 to n
generate an array from 1 to n
def generate(n)
    middleware.call(n) do |n|
      (1..n).to_a
    end
  end
def generate ( n ) middleware . call ( n ) do | n | ( 1 .. n ) . to_a end end
generate an array from 1 to n
generate an array from 1 to n
# invoke middleware chain # do the actual work of generating your results
n