Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000576OCamlOCaml generalpublic2001-10-13 10:172013-08-30 22:02
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000576: Suggestion: add_new to map
Descriptionsame definition as Map.add, except that it will throw an exception if the
key already exists. (I think that this should have been the default
behaviour of add, and the current add should have been called replace)

    let rec add x data = function
        Empty ->
          Node(Empty, x, data, Empty, 1)
      | Node(l, v, d, r, h) as t ->
          let c = Ord.compare x v in
          if c = 0 then
            raise XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
          else if c < 0 then
            bal (add x data l) v d r
          else
            bal l v d (add x data r)

/mattias

Tagsjunior_job, patch
Attached Files

- Relationships
related to 0000340closedfrisch Implementer dans Map les memes operations que dans Set 

-  Notes
(0000116)
administrator (administrator)
2002-11-13 16:20

Reasonable suggestion. Find good name?

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2008-02-19 15:01 doligez Relationship added related to 0000340
2013-08-30 22:02 doligez Tag Attached: junior_job
2013-08-30 22:02 doligez Tag Attached: patch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker