sc@(SortedArray traits) shouldArrange: x before: y
[sc sortBlock applyTo: {x. y}].
+sc@(SortedArray traits) min
+[sc isEmpty ifFalse: [sc first]].
+
+sc@(SortedArray traits) max
+[sc isEmpty ifFalse: [sc last]].
+
sc@(SortedArray traits) median
[sc at: sc size + 1 // 2].
matches
].
+m@(Regex Matcher traits) subexpressionMatchesArray
+[ | matches |
+ matches: (ExtensibleArray new &capacity: m subexpressions keys max + 1).
+ m subexpression keysDo: [|:key | matches at: key put: (m subexpression: key)].
+ matches
+].
+
+
m@(Regex Matcher traits) matches: node
[
(m match: node) ~= Regex Matcher Fail
m match: s from: 0
].
+string@(String traits) =~ regex@(Regex Matcher traits)
+[
+ regex `>> [match: string. subexpressionMatchesArray]
+].
+
+string@(String traits) =~ regex@(String traits)
+[
+ string =~ (Regex Matcher newOn: regex)
+].
+
+
m@(Regex Matcher traits) match: s@(String traits) from: fromStart
[ |res|
m subexpressions: Dictionary new.