Implementation of several classic data structures in Ruby