From: Martin DeMello Date: 2003-08-01T00:41:41+09:00 Subject: Ruby haiku (senryu?) Rudolf Polzer wrote: > OK, now define what a syllable is. A token (including |, ; and others)? A > keyword or identifier? A keyword or identifier's syllable? Or even a > token's syllable: ; = se-mi-co-lon [probably not, I don't know English > hyphenation]? se-mi-ko-ro-n [oops, virtually no ; allowed in the first > or third line *g*]? Okay, here's a go at it, trying to keep line breaks as clean as possible # steps through an array # yielding only elements # with non-nil values class Array def filled each do |x| # "each do x" next unless x yield x end end end Still flawed in that the natural idiom is "yield x if x" but it's a start. This is fun! martin