Skip to content

Instantly share code, notes, and snippets.

@henrikh
Created December 5, 2010 19:48
Show Gist options
  • Save henrikh/729402 to your computer and use it in GitHub Desktop.
Save henrikh/729402 to your computer and use it in GitHub Desktop.
One of the tasks for 7 PL in 7 Weeks
a = (1..16)
stash = []
a.each {|e| p stash[-4..-1] if stash.push(e).count % 4 == 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment