irb(main):012:0> def n_times(thing)
irb(main):013:1> return lambda {|n| thing * n}
irb(main):014:1> end
=> nil
irb(main):015:0> p1=n_times(23)
=> #<Proc:0xb77281f4@(irb):13>
irb(main):016:0> p1.call(3)
=> 69
irb(main):017:0> p1.call(4)
=> 92
irb(main):018:0> p2=n_times("Hello ")
=> #<Proc:0xb77281f4@(irb):13>
irb(main):019:0> p2.call(3)
=> "Hello Hello Hello "
irb(main):020:0>