From: ts Date: 2001-03-10T02:38:46+09:00 Subject: [ruby-talk:12341] Re: Q re looping structures >>>>> "B" == Benjamin J Tilly writes: B> Yes. You need to maintain a cache of what pairs of ids B> have been seen together in this comparison, and return B> true when you see that you have seen this match. This B> gives an equivalence relation, and it works out to, This is OK for you this : pigeon% cat b.rb #!/usr/bin/ruby require 'tangle' def cl( a, n) base=loop= [a.clone] (n-1).times { tmp = [a.clone]; loop << tmp; loop = tmp } loop << base base end p cl("a",1) == cl("a",101) pigeon% pigeon% b.rb true pigeon% Guy decoux