Skip to content

Instantly share code, notes, and snippets.

@eLafo
Created April 14, 2011 17:36
Show Gist options
  • Save eLafo/920021 to your computer and use it in GitHub Desktop.
Save eLafo/920021 to your computer and use it in GitHub Desktop.
def sequence_proc_generator
value = 0
lambda { value += value }
end
sequencer = power_proc_generator
#sequencer.call => 1
#sequencer.call => 2
#sequencer.call => 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment