I think technically this counts as an application of my readings from Algebra of Programming. Satisfied. class Cons include Enumerable attr_accessor :child, :value def self.[](value, child=:empty) new(value, child) end def initialize(value, child) @value, @child = value, child end def each x = self while( x != :empty) yield x x = x.child end end end [...]
Categories: ruby
- Published:
- October 28, 2009 – 7:55 pm
- Author:
- By John Bender
[Update: Nick Quaranto was kind enough to respond to my twitter message, and the issue has been resolved. Many thanks Nick!] So I went to publish RQuery to gem cutter but I got this lovely tidbit: Pushing gem to Gemcutter… You do not have permission to push to this gem. I figured someone had clearly [...]
Categories: uncategorized
- Published:
- October 26, 2009 – 1:34 pm
- Author:
- By John Bender