News for hackers. Stuff that matters.
Re:Python iteration by charliesome on Wednesday April 25, 2012 @08:26PM (#3891783)
I've used zip before to find an LCA:

    def lca(a,b)
      a.ancestors.zip(b.ancestors).take_while { |a,b| a == b }.last
    end

There are no comments on this comment yet.