Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Making a List into a Tree with Structural Recursion

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Making a List into a Tree with Structural Recursion


chronological Thread 
  • From: roconnor AT theorem.ca
  • To: Coq Club <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Making a List into a Tree with Structural Recursion
  • Date: Fri, 16 Dec 2005 11:02:37 -0500 (EST)
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

On Fri, 16 Dec 2005, Thery Laurent wrote:

> Eval compute in (toTree 2 (1:: 2:: 3:: 4:: nil)).

This isn't quite what I'm looking for.

I want (toTree (1::2::3::4::5::nil)) to return something like

(Node (Node (Node (Leaf 1) (Leaf 2)) (Leaf 3)) (Node (Leaf 4) (Leaf 5)))

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''




Archive powered by MhonArc 2.6.16.

Top of Page