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/ord-set-sig.sml
ViewVC logotype

Diff of /smlnj-lib/branches/rt-transition/Util/ord-set-sig.sml

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

revision 4069, Tue Jun 9 20:52:48 2015 UTC revision 4070, Thu Jun 11 12:33:25 2015 UTC
# Line 9  Line 9 
9    sig    sig
10    
11      structure Key : ORD_KEY      structure Key : ORD_KEY
12            (* the set elements and their comparison function *)
13    
14      type item = Key.ord_key      type item = Key.ord_key
15      type set      type set
# Line 90  Line 91 
91           *)           *)
92    
93      val partition : (item -> bool) -> set -> (set * set)      val partition : (item -> bool) -> set -> (set * set)
94            (* partition a set into two based using the given predicate.  Returns two
95             * sets, where the first contains those elements for which the predicate is
96             * true and the second contains those elements for which the predicate is
97             * false.
98             *)
99    
100      val filter : (item -> bool) -> set -> set      val filter : (item -> bool) -> set -> set
101            (* filter a set by the given predicate returning only those elements for
102             * which the predicate is true.
103             *)
104    
105      val exists : (item -> bool) -> set -> bool      val exists : (item -> bool) -> set -> bool
106            (* check the elements of a set with a predicate and return true if
107             * any element satisfies the predicate. Return false otherwise.
108             * Elements are checked in key order.
109             *)
110    
111        val all : (item -> bool) -> set -> bool
112            (* check the elements of a set with a predicate and return true if
113             * they all satisfy the predicate. Return false otherwise.  Elements
114             * are checked in key order.
115             *)
116    
117      val find : (item -> bool) -> set -> item option      val find : (item -> bool) -> set -> item option
118            (* find an element in the set for which the predicate is true *)
119    
120    end (* ORD_SET *)    end (* ORD_SET *)

Legend:
Removed from v.4069  
changed lines
  Added in v.4070

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