Created
February 5, 2010 09:01
-
-
Save moiseev/295662 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
let foldClause simpleF complexF clause = | |
let unitem = function | |
| Prop ss -> ss | |
let rec loop clause cont = | |
match clause with | |
| Simple (item, condition, value) -> | |
cont (simpleF (unitem item) condition value) | |
| Complex (l, op, r) -> | |
loop l (fun lval -> | |
loop r (fun rval -> | |
cont (complexF lval op rval))) | |
loop clause id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment