type 'a list = Nil | Cons of 'a * 'a list
type 'a ntree = NLeaf | NNode of 'a ntree * 'a * 'a ntree

let rec span : forall 'a. 'a list -> 'a ntree = fun ['a] (t : 'a list) =>
  match t with
    | Nil => NLeaf['a]
    | Cons(x,xs) => NNode['a](span ['a] xs, x, span ['a] xs)
  end

let forall 'a ornament span ['a] : 'a list -> 'a ntree