Today we have some fun with Enumerable methods in order to check the sorted status of a list.
Justin Weiss is the featured guest chef, in this episode about sorting trees and why you might want to.
In this episode, we'll look at an easy way to find items in a collection with the lowest (or highest) of some attribute. And at how we can apply this …
It's often desirable compare objects to see which is "lesser" or "greater"; but not all objects are inherently comparable. Today we'll look at a scheme for easily imposing an arbitrary …
In episode 205 we introduced the spaceship () operator, but we also introduced an incompatibility with how Ruby's builtin comparisons work. Today we'll address this oversight.
In this episode we meet a Ruby standard module that makes it easy to make classes comparable and sortable.
Building on the previous episode on hash tables, today we tackle the concept of hash equality: how Ruby decides if two objects are the same for the purpose of use …
Today's dish is an exploration of how Ruby is able to quickly look up keys in hashes.
Today's episode deals with the concepts of identity and equality - what makes one object equal to another.
Today's episode demonstrates a technique for speeding up the process of sorting some collections.