Version franēaise
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Tries are to sequences as ? is to trees
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-04-26 (01:26)
From: Jon Harrop <jon@f...>
Subject: Tries are to sequences as ? is to trees

So tries let us associate sequences with values. What data structure lets us 
associate trees with values?

I ask because I am interested in replacing hash consing of expressions with a 
purely functional equivalent so I need a way to map expressions onto 

The only idea I've come up with so far is to fold over the tree to make a 
sequence and use that as the key into a trie but it seems a bit naff...

Dr Jon D Harrop, Flying Frog Consultancy Ltd.