Skip to content

Instantly share code, notes, and snippets.

@kai-qu
Created May 11, 2015 01:17
Show Gist options
  • Save kai-qu/e8505d5dfd47c4802d15 to your computer and use it in GitHub Desktop.
Save kai-qu/e8505d5dfd47c4802d15 to your computer and use it in GitHub Desktop.
nested input-output examples
type var = string
type inputVal =
| Impossible
| Any
| Some of exp
type inputAssn = var * inputVal
type output = exp
(* variant of a rose tree *)
type ('value, 'output) ioTree =
| Leaf of 'output
| Nested of ('value * ('value, 'output) ioTree) list
type inputTree = (inputAssn, output) ioTree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment