Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type StateTree =
- | False
- | True
- | Node of StateTree[]
- let construct (domSize: int []) (state: int []) =
- let rec loop i =
- if i = state.Length
- then True
- else Node(Array.init (domSize.[i]) (fun j -> if state.[i] = j then loop (i + 1) else False))
- loop 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement