module sdml_sequence_ordered is

  import skos

  class Ordered (S <- {ordered 0..} T) is

    def drop (self -> S count → unsigned) → S is
      @skos:definition = "Drop ~count~ items from the beginning of the sequence and return the rest."@en
    end

    def get (self -> S index → unsigned) → {0..1} T is
      @skos:definition = "Return the element in this sequence at the position ~index~."@en
    end

    def reverse(self -> S) → S is
      @skos:definition = "Return a new sequence with the order of elements reversed."@en
    end

    def slice (self -> S start → unsigned count → unsigned) → S :=
      take(drop(self count) start) is
      @skos:definition = "Return a sub-sequence of ~count~ elements starting at ~start~."@en
    end

    def take (self -> S count → unsigned) → S is
      @skos:definition = "Return ~count~ items from the beginning of the sequence and discard the rest."@en
    end

  end

end
