caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Annotated trees
@ 2010-06-06 15:26 Daniel Bünzli
  2010-06-07  5:09 ` [Caml-list] " Martin Jambon
  2010-06-07  6:45 ` Jacques Garrigue
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Bünzli @ 2010-06-06 15:26 UTC (permalink / raw)
  To: caml-list List

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-07 12:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-06 15:26 Annotated trees Daniel Bünzli
2010-06-07  5:09 ` [Caml-list] " Martin Jambon
2010-06-07  5:15   ` Martin Jambon
2010-06-07  9:22   ` Daniel Bünzli
2010-06-07 12:01     ` blue storm
2010-06-07  6:45 ` Jacques Garrigue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).