On Jan 21, 2006, at 12:47 PM, Chris Turner wrote: > On 1/20/06, Matthew Moss <matthew.moss.coder / gmail.com> wrote: >> def test_16x16 >> # ... >> assert_equal xpct, fold(16, 16, "TLBLRRTB") >> end > > Is this right? I was under the impression that the above fold string > is invalid. You shouldn't be able to fold "RR" or "TB", as you must > always fold in half. My solution, at least, tells me that. :-) You can fold a 4x8 sheet of paper in half four ways. Two of them produce a dimensions 2x8, and two of them produce dimensions 4x4. You seem to imply that 'folding in half' means always produce a square result, unless the paper is already square.