It's not a functional way, but I'd suggested you to use IEnumerator instead of IEnumerable.

1
2
3
4
5
6
7
8
let enum1, enum2 = seq1.GetEnumerator(), seq2.GetEnumerator()
let nempty1, nempty2 = ref enum1.MoveNext(), ref enum2.MoveNext()
while !nempty1 && !nempty2 do
  if someKindOfEquality enum1.Current enum2.Current then
    nempty1 := enum1.MoveNext()
    nempty2 := enum2.MoveNext()
  else
    // not equal, compare them and move one of enumerators
By on 4/16/2011 3:34 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper