Skip to content

Instantly share code, notes, and snippets.

@DanFerrer
Created February 3, 2015 19:03
Show Gist options
  • Select an option

  • Save DanFerrer/aaba42b82adf7317a927 to your computer and use it in GitHub Desktop.

Select an option

Save DanFerrer/aaba42b82adf7317a927 to your computer and use it in GitHub Desktop.
require 'pry'
require 'pry-nav'
def create_groups(student_list, group_size, total_days)
binding.pry
# groups = student_list.each_slice(group_size) {|student| p student}
# return groups
my_student_list = student_list
groups = Array.new(total_days, Array.new(group_size))
groups.map! do |students|
students. do |student|
student = my_student_list.shift
end
end
return groups
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment