Browse thread
Annotated trees
- Daniel_Bünzli
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Daniel_Bünzli <daniel.buenzli@e...> |
| Subject: | Annotated trees |
Hello, Does anybody have any real world experience in choosing between the following two representations for a tree augmented with annotations ? type 'a t = 'a * [ `Leaf of string | `Node of 'a t list ] type 'a t = [ `Leaf of 'a * string | `Node of 'a * 'a t list ] Which one is more convenient to process, pattern match on, makes code more readable etc. ? Thanks in advance, Daniel