The beauty of functional programing in ruby