///|
/// Public-API consumer example, also used as a CI smoke test.
fn main {
  let config = match @treespec.TreeExperimentConfig::new(2, 3, 14, 32, 12345) {
    Ok(value) => value
    Err(_) => abort("invalid configuration")
  }
  let model = fn(context : Array[Int]) -> Result[Array[Double], String] {
    Ok(if context.length() % 2 == 0 { [0.0, 2.0] } else { [2.0, 0.0] })
  }
  match @treespec.compare_tree_decoding([0], model, model, config) {
    Ok(result) => println(result.render())
    Err(_) => abort("decoding failed")
  }
}