trie - val cursor: 'a trie -> char list -> 'a cursor...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
exception NotFound e type 'a trie t type 'a cursor t (* An empty trie with no bindings *) val empty: 'a trie v (* put m n v inserts value v into m with binding n *) val put: 'a trie -> char list -> 'a -> 'a trie v (* get t k = v if t contains the binding k->v *) val get: 'a trie -> char list -> 'a v (* size(t) returns the size of trie t *) val size: 'a trie -> int v (* cursor t k is a cursor *)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: val cursor: 'a trie -> char list -> 'a cursor v (* advance c n returns a new cursor correspoding to the * trie node reached by travelling along n from the current * position *) val advance: 'a cursor -> char -> 'a cursor option v (* getc(c) returns the value stored at the cursor position *) val getc: 'a cursor -> 'a option...
View Full Document

This note was uploaded on 10/25/2009 for the course CS 3110 at Cornell.

Ask a homework question - tutors are online