![](https://vz-5bfef681-a70.b-cdn.net/d8d6f778-c46a-4a6c-a116-1cc837f9e91a/thumbnail_eb2fde62.jpg)
Want more GoRails?
GoRails is packed full with 710 lessons just like this one.
Sign up to get full access or log in to your account and sit back.
Your Teacher
About This Episode
In this lesson, we will look at how to clean up code that iterates over a collection twice to separate the elements out to only doing so once while achieving the same result by leveraging the partition method from Ruby's Enumerable module.