Created
February 5, 2010 09:04
-
-
Save moiseev/295665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type IClauseVisitor<'TState> = | |
abstract member Simple : String array * Condition * Val -> 'TState | |
abstract member Complex : 'TState * LogicalOperation * 'TState -> 'TState | |
let visitClause (visitor:#IClauseVisitor<'TState>) clause = | |
let simpleF props (cond:Cond) value = visitor.Simple(props, (cond.ToEnum()), value) | |
let complexF left (logOp:LogOp) right = visitor.Complex(left, (logOp.ToEnum()), right) | |
Clause.Fold simpleF complexF clause | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment