From: cyberco Date: 2005-11-26T00:42:27+09:00 Subject: recursion I'm trying to print every combination of three characters from the range (a..z). I thought recursion would be the most elegant solution, but that got me quite confused :) Any suggestions? Here's my (erronous) attempt: ________________________ def addChar(str, level) ('a'..'z').each {|c| if level == 2 puts str + c else str += c addChar(str, level + 1) end } end addChar("", 0)