   single: (x) -> x
   sum:    (a, b) -> if b? then b else a
 
-SortedExtensions = (less) -> class
+SortedExtensions = (less, extensions) -> class extends extensions
   after  = (s, k) ->
     if k == undefined then s else new s.constructor s.data.after k
 

  @::plus = @::insert


SortedSeq = new FingerTreeType OrderMeasure, SortedExtensions (a, b) -> a < b


# --------------------------------------------------------------------


exports.FingerTreeType = FingerTreeType
exports.CountedSeq     = CountedSeq
exports.SortedSeqType  = SortedSeqType
exports.SortedSeq      = new SortedSeqType()
