How to have two methods calling each other?
问题 I\'m a bit confused as to how to get two method to call each other (i.e., have A() call B() and B() call A() ). It seems that F# only \'sees\' the method after it\'s been encountered in code, so if it hasn\'t, it just says value or constructor has not been defined . Am I missing something very basic here? 回答1: 'let rec... and...' is the syntax you seek. let rec F() = G() and G() = F() See also Adventures in F# Co-Recursion. 回答2: Since the question is about methods, and Brian's answer is about