Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /smlnj-lib/branches/rt-transition/Util/int-redblack-map.sml
ViewVC logotype

Diff of /smlnj-lib/branches/rt-transition/Util/int-redblack-map.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2144, Thu Nov 2 16:23:11 2006 UTC revision 2274, Tue Jan 30 15:00:09 2007 UTC
# Line 112  Line 112 
112              find' t              find' t
113            end            end
114    
115      (* Look for an item, raise NotFound if the item doesn't exist *)
116        fun lookup (MAP(_, t), k) = let
117              fun look E = raise LibBase.NotFound
118                | look (T(_, a, yk, y, b)) =
119                    if (k < yk)
120                      then  look a
121                    else if (k = yk)
122                      then y
123                      else look b
124              in
125                look t
126              end
127    
128    (* Remove an item, returning new map and value removed.    (* Remove an item, returning new map and value removed.
129     * Raises LibBase.NotFound if not found.     * Raises LibBase.NotFound if not found.
130     *)     *)

Legend:
Removed from v.2144  
changed lines
  Added in v.2274

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0