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/binary-set-fn.sml
 [smlnj] / smlnj-lib / branches / rt-transition / Util / binary-set-fn.sml

# Diff of /smlnj-lib/branches/rt-transition/Util/binary-set-fn.sml

revision 4069, Tue Jun 9 20:52:48 2015 UTC revision 4070, Thu Jun 11 12:33:25 2015 UTC
# Line 414  Line 414
414              )              )
415                (empty, empty) set                (empty, empty) set
416
417        fun exists p E = false
418          | exists p (T{elt, left, right,...}) =
419              (exists p left) orelse (p elt) orelse (exists p right)
420
421        fun all p E = true
422          | all p (T{elt, left, right,...}) =
423              (all p left) andalso (p elt) andalso (all p right)
424
425      fun find p E = NONE      fun find p E = NONE
426        | find p (T{elt,left,right,...}) = (case find p left        | find p (T{elt,left,right,...}) = (case find p left
427             of NONE => if (p elt)             of NONE => if (p elt)
# Line 422  Line 430
430              | a => a              | a => a
431            (* end case *))            (* end case *))
432
fun exists p E = false
| exists p (T{elt, left, right,...}) =
(exists p left) orelse (p elt) orelse (exists p right)

433    end (* BinarySetFn *)    end (* BinarySetFn *)

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